Chess
technol (1)

Need help completing the game ending sequence....... i dont know what to do :shrug_emoji:

You are viewing a single comment. View All
xxpertHacker (931)

@EpicGamer007 Iirc, you posted a game of chess to Repl talk before, do you think you could help OP here?

EpicGamer007 (1755)

@xxpertHacker i might, i have not peeked at the code however what I did was:

  • Every single move:

    • For both kings
      • Check if the king does not have a place to move, check cannot be blocked, or attacker can not be removed.
        • If all those are true (all the conditions of checkmate are met) game is over.

However it seems that this person is ending the game with a capture of the king, this would probably be much simpler. looping through all the game objects and checking if the king is gone, however, I do not know what the current implementation is so this may not work for OP.