add FILE* output

This commit is contained in:
2023-07-01 20:56:26 +02:00
parent fe5b21aad9
commit aa7cb11056
6 changed files with 40 additions and 23 deletions

View File

@@ -17,6 +17,9 @@
#include <bits.h>
/* piece_t bits structure
* MSB 8 7 6 5 4 3 2 1 LSB
* 1: color (0 for white)
* 2-7: bit set for pawn (2), knight, bishop, rook, queen, king (7)
*/
typedef u8 piece_t;

View File

@@ -98,7 +98,8 @@ int main(int ac, char**av)
pos_t *pos;
eval_t res;
debug_init(5);
debug_init(5, stderr);
piece_pool_init();
moves_pool_init();
pos_pool_init();
@@ -118,6 +119,7 @@ int main(int ac, char**av)
//pos_print(pos);
//pos_pieces_print(pos);
moves_gen(pos, pos->turn, true);
pos_print(pos);
moves_print(pos, M_PR_SEPARATE);
res = eval(pos);
printf("eval=%d centipawns)\n", res);

View File

@@ -179,7 +179,7 @@ int main(int ac, char**av)
{
pos_t *pos;
debug_init(5);
debug_init(5, stderr);
piece_pool_init();
pos_pool_init();
pos = pos_get();

View File

@@ -119,7 +119,7 @@ int main(int ac, char**av)
{
pos_t *pos;
printf("zobi\n");fflush(stdout);
debug_level_set(6);
debug_init(6, stderr);
log_f(5, "kfsjdhg\n");
pos_pool_init();
pos = pos_get();