diff options
author | eug-vs <eugene@eug-vs.xyz> | 2022-08-31 08:14:30 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2022-08-31 08:39:21 +0300 |
commit | d3c719b48c8fa73a5b281b54df265cfe597c5b86 (patch) | |
tree | eaca6880dc224593572e5ed4eafbe4f5de15ea7d | |
parent | 1ee34b9d35a1ad6083967f858988180a425e43ec (diff) | |
download | c-chess-d3c719b48c8fa73a5b281b54df265cfe597c5b86.tar.gz |
feat: display floating point evaluation
-rw-r--r-- | src/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |