From d3c719b48c8fa73a5b281b54df265cfe597c5b86 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Wed, 31 Aug 2022 08:14:30 +0300 Subject: feat: display floating point evaluation --- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index c68c62e..e25d6e2 100644 --- a/src/main.c +++ b/src/main.c @@ -598,7 +598,7 @@ int main() { while (1) { int color = ply % 2; printf("##### Ply %i #####\n", ply); - printf("Current evaluation: %i\n", evaluate_position(board, 0, WHITE)); + printf("Current evaluation: %.2f\n", (double)evaluate_position(board, 0, WHITE) / 10); if (color == PLAYER) { printf("Enter a move for %s:\n", COLORS[color]); @@ -615,7 +615,7 @@ int main() { char move_in_notation[] = "xy XY"; index_to_notation(move.origin, move_in_notation); index_to_notation(move.destination, move_in_notation + 3); - printf("%s: %s with evaluation %c=%i on Ply %i\n", COLORS[color], move_in_notation, color == WHITE ? '>' : '<', move.value, ply + MAX_DEPTH); + printf("%s: %s with evaluation %c=%.2f on Ply %i\n", COLORS[color], move_in_notation, color == WHITE ? '>' : '<', (double)move.value / 10, ply + MAX_DEPTH); } int error = validate_move(move, color, board); -- cgit v1.2.3