<commit_before>#include <kotaka/paths.h>
#include <kotaka/log.h>
#include "~/test.h"

#include <status.h>

static void create()
{
}

void logbomb()
{
	int i;
	call_out("logbomb", 0);

	for (i = 0; i < 5000; i++) {
		LOGD->post_message("test", LOG_DEBUG, STRINGD->chars(32, 10) + "\n");
	}
}

void ignite(int count)
{
	call_out("bomb", 0, count);
}

void touchall()
{
	int i;

	LOGD->post_message("test", LOG_INFO, "Beginning touch");

	call_out("do_touch", 0, status(ST_OTABSIZE) - 1);
}

static void do_touch(int quota)
{
	int limit;

	limit = 1024;

	if (quota % limit != 0) {
		limit = quota % limit;
	}

	for (; quota >= 0 && limit > 0; quota--, limit--) {
		object bomb;

		if (bomb = find_object("~/obj/bomb" + quota)) {
			call_touch(bomb);
		}
	}

	LOGD->post_message("test", LOG_INFO, quota + " objects left to check for touches.");

	if (quota > 0) {
		call_out("do_touch", 0, quota);
	}
}

static void bomb(int quota)
{
	int limit;

	limit = 100;
	limit += quota % limit;

	for (; quota > 0 && limit > 0; quota--, limit--) {
		clone_object("~/obj/bomb");
	}

	LOGD->post_message("test", LOG_INFO, quota + " bombs left to clone.");

	if (quota > 0) {
		call_out("bomb", 0, quota);
	}
}<commit_msg>Add hook for Game to test itself<commit_after>#include <kotaka/paths.h>
#include <kotaka/log.h>
#include "~/test.h"

#include <status.h>

static void create()
{
}

void logbomb()
{
	int i;
	call_out("logbomb", 0);

	for (i = 0; i < 5000; i++) {
		LOGD->post_message("test", LOG_DEBUG, STRINGD->chars(32, 10) + "\n");
	}
}

void ignite(int count)
{
	call_out("bomb", 0, count);
}

void touchall()
{
	int i;

	LOGD->post_message("test", LOG_INFO, "Beginning touch");

	call_out("do_touch", 0, status(ST_OTABSIZE) - 1);
}

static void do_touch(int quota)
{
	int limit;

	limit = 1024;

	if (quota % limit != 0) {
		limit = quota % limit;
	}

	for (; quota >= 0 && limit > 0; quota--, limit--) {
		object bomb;

		if (bomb = find_object("~/obj/bomb" + quota)) {
			call_touch(bomb);
		}
	}

	LOGD->post_message("test", LOG_INFO, quota + " objects left to check for touches.");

	if (quota > 0) {
		call_out("do_touch", 0, quota);
	}
}

static void bomb(int quota)
{
	int limit;

	limit = 100;
	limit += quota % limit;

	for (; quota > 0 && limit > 0; quota--, limit--) {
		clone_object("~/obj/bomb");
	}

	LOGD->post_message("test", LOG_INFO, quota + " bombs left to clone.");

	if (quota > 0) {
		call_out("bomb", 0, quota);
	}
}

void test()
{
}
{'fraction_non_alphanumeric': 0.19510204081632654, 'fraction_numerical': 0.0236734693877551, 'mean_word_length': 3.489010989010989, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2956499', 'n_tokens_mistral': 1138, 'n_tokens_neox': 998, 'n_words': 252}