You are browsing as a guest. Sign up (or log in) to start making projects!

8h 12m 44s logged

Chess game update

Today I added the insufficient material feature. It took me a while to figure out because I was trying to use formulas and math to make the code analyze if a certain set of pieces can lead to a checkmate, but I realized that instead of calculating, I can just find which combinations of pieces cannot lead to checkmate, and then list those pieces in the code for the game to constantly check, and then determine if its a stalemate/draw.

Below is the combinations of pieces that cannot lead to a checkmate that my code checks and accounts for:

  • King vs King
  • King + Bishop vs King
  • King + Knight vs King
  • King + Bishop vs King + Bishop (same color squares)
0
2

Comments 0

No comments yet. Be the first!