However, when I checkmated Black, it resigned instead of saying that I had won by checkmate.
Well, being checkmated seemed a good reason to resign!
But seriously: not all chess variants have the same winning condition (checkmate, stalemate, king capture, baring, reaching a goal square). Currently the Diagram only knows by the score returned by the search that it has lost, and it cannot see for what reason. So I made it print a universally valid message. The problem still exists when it wins, though; then it says 'checkmate'. Which sounds really stupid when the win was by another method, even stalemate. I could of course have it print 'I win'. But it already does that when it captures the King. And for some variants the goal actually is King capture. So checkmate would then not yet terminate the game (so that 'I win' would be incorrect); it would just be an announcement that it will force a win in the next move. For this reason you can always play on even when checkmated.
Well, being checkmated seemed a good reason to resign!
But seriously: not all chess variants have the same winning condition (checkmate, stalemate, king capture, baring, reaching a goal square). Currently the Diagram only knows by the score returned by the search that it has lost, and it cannot see for what reason. So I made it print a universally valid message. The problem still exists when it wins, though; then it says 'checkmate'. Which sounds really stupid when the win was by another method, even stalemate. I could of course have it print 'I win'. But it already does that when it captures the King. And for some variants the goal actually is King capture. So checkmate would then not yet terminate the game (so that 'I win' would be incorrect); it would just be an announcement that it will force a win in the next move. For this reason you can always play on even when checkmated.