From 4d7900c44c7559c30c4e92bfc643c997f3cc101b Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Tue, 2 Jul 2024 00:07:08 +0200 Subject: [PATCH] eval best move --- checkers.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/checkers.c b/checkers.c index c40efe0..8f99468 100644 --- a/checkers.c +++ b/checkers.c @@ -185,8 +185,11 @@ int main (int argc, char *argv[]) boardwindow (board); if (1) { /* not end of game */ + char msg[128] = {0}; jump = cursorwindow (board, xcursor, ycursor, mode); - msgwindow (player == 0 ? "Player One": "Player Two", xmsg, ymsg, lmsg); + int nb = globalmaxjumps (board, player); + sprintf (msg, "Player %s (%d)", (player == 0) ? "One": "Two", nb); + msgwindow (msg, xmsg, ymsg, lmsg); } else { msgwindow ("End of game", xmsg, ymsg, lmsg); } -- 2.30.2