Soft'N'Design Software
/
projects
/
checkers.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cded799
)
eval best move
author
Laurent Mazet
<mazet@softndesign.org>
Mon, 1 Jul 2024 22:07:08 +0000
(
00:07
+0200)
committer
Laurent Mazet
<mazet@softndesign.org>
Mon, 1 Jul 2024 22:07:08 +0000
(
00:07
+0200)
checkers.c
patch
|
blob
|
blame
|
history
diff --git
a/checkers.c
b/checkers.c
index c40efe013c79656c7604c55ec07b1028579b86f8..8f994688d64b47de2dde56e5e115964689de407d 100644
(file)
--- 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);
}