Commit 6dd9b07
committed
Follow-up fix: check for end-of-game when leaving edit mode.
If the user edits the board into a state where the game
has ended, we suppress reporting end of game until the
user leaves edit mode. At that point, check for checkmate
or draw that should result in the game being terminated.
The previous commit left the UI in a state where a player
could be checkmated, but we would still ask them to make
a move when no legal moves existed.
Now we will immediately report that the game is over
as soon as the user leaves edit mode.1 parent 30b13a9 commit 6dd9b07
2 files changed
+19
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
953 | 954 | | |
954 | 955 | | |
955 | 956 | | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
956 | 968 | | |
957 | 969 | | |
958 | 970 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
2619 | 2620 | | |
2620 | 2621 | | |
2621 | 2622 | | |
| 2623 | + | |
| 2624 | + | |
| 2625 | + | |
| 2626 | + | |
| 2627 | + | |
| 2628 | + | |
2622 | 2629 | | |
2623 | 2630 | | |
2624 | 2631 | | |
| |||
0 commit comments