In a game, when neither side can checkmate the other, the game should be immediately drawn. However, if a checkmate is possible, no matter how, then the game should continue.
For example, this game should go on, because white can win with Ng6#:
(A) lichess.org/tr6za6qg
This game should be drawn immediately, because neither side can deliver a checkmate:
(B) lichess.org/pnenns77
This game should be drawn as well, but there's no quick way to detect it:
(C) lichess.org/5f98pco2
I suggest you to change the implementation according to the following list - it would be an easy patch for examples A and B, while there's nothing we can do about example C:
>>>>
If
(White has nothing but a king), and (Black has nothing but a king and one knight), or
(White has nothing but a king and one knight), and (Black has nothing but a king), or
(White has nothing but a king and (zero or more same-square-coloured bishops)), and (Black has nothing but a king and (zero or more bishops that are of the same square colour as White's bishops)),
then the game is immediately drawn.
<<<<
P.S.:
Thanks, Mephostophilis! The list idea is better than I thought!
For example, this game should go on, because white can win with Ng6#:
(A) lichess.org/tr6za6qg
This game should be drawn immediately, because neither side can deliver a checkmate:
(B) lichess.org/pnenns77
This game should be drawn as well, but there's no quick way to detect it:
(C) lichess.org/5f98pco2
I suggest you to change the implementation according to the following list - it would be an easy patch for examples A and B, while there's nothing we can do about example C:
>>>>
If
(White has nothing but a king), and (Black has nothing but a king and one knight), or
(White has nothing but a king and one knight), and (Black has nothing but a king), or
(White has nothing but a king and (zero or more same-square-coloured bishops)), and (Black has nothing but a king and (zero or more bishops that are of the same square colour as White's bishops)),
then the game is immediately drawn.
<<<<
P.S.:
Thanks, Mephostophilis! The list idea is better than I thought!