From: Laurent Mazet Date: Mon, 1 Jul 2024 22:07:08 +0000 (+0200) Subject: eval best move X-Git-Tag: v1.0~30 X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=4d7900c44c7559c30c4e92bfc643c997f3cc101b;p=checkers.git eval best move --- 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); }