Exemplo n.º 1
0
int main(int argc, char * argv[]) {

   // init

   util_init();
   my_random_init(); // for opening book

   printf("Toga II 1.2.1a UCI based on Fruit 2.1 by Thomas Gaksch and Fabien Letouzey. Settings by Dieter Eberle\n");

   // early initialisation (the rest is done after UCI options are parsed in protocol.cpp)

   option_init();

   square_init();
   piece_init();
   pawn_init_bit();
   value_init();
   vector_init();
   attack_init();
   move_do_init();

   random_init();
   hash_init();

   trans_init(Trans);
   book_init();

   // loop

   loop();

   return EXIT_SUCCESS;
}
Exemplo n.º 2
0
int main(int argc, char *argv[]) {

	// init

	util_init();
	my_random_init(); // for opening book

	printf(
		"Gambit Fruit based on Fruit 2.1 and Toga by Ryan Benitez, Thomas Gaksch and Fabien Letouzey\nEdit by Evgeniy Zheltonozhskiy\n");

	// early initialisation (the rest is done after UCI options are parsed in protocol.cpp)

	option_init();

	square_init();
	piece_init();
	pawn_init_bit();
	value_init();
	vector_init();
	attack_init();
	move_do_init();

	random_init();
	hash_init();

	trans_init(Trans);
	book_init();

	// loop
	loop();

	return EXIT_SUCCESS;
}
Exemplo n.º 3
0
void product_cache_load_cache()
{
	struct book *b1;
	struct disk *d1;

	printf("product_cache::load_cache()\n");
	
	b1 = malloc(sizeof(*b1));
	book_init(b1);
	product_set_description(&b1->product, "Oliver Twist");
	product_set_sku(&b1->product, "B1");
	book_set_pages_num(b1, 100);

	product_cache_ops.product_list[product_cache_ops.product_list_sz++] = &b1->product;

	d1 = malloc(sizeof(*d1));
	disk_init(d1);
	product_set_description(&d1->product, "Superman");
	product_set_sku(&d1->product, "D1");
	disk_set_duration(d1, 180);

	product_cache_ops.product_list[product_cache_ops.product_list_sz++] = &d1->product;
}