Added basic promotions when the pawns go to the opposite side (for now they default to only queen promotions, more coming soon) and right now started working on the final boss of chess programming… Checks and checkmates. Wish me luck!
Added basic promotions when the pawns go to the opposite side (for now they default to only queen promotions, more coming soon) and right now started working on the final boss of chess programming… Checks and checkmates. Wish me luck!
Welcome back to my pit of inevitable doom, where I’m trying to build fully fledged chess inside pure Python turtle.
This devlog is because I finally managed to get a glimpse of the sunlight and add the special moves and captures for pawns. Before right now, pawns could only move one step forward no matter the place, and they actually captured by going forward into the enemy. If you play chess, you know it’s not like that.
I have now implemented the following:
Follow along if you want to see if I ever get out of this!!! :D
Added legal moves and support for the knight, king, rook and pawn. The bishop is on the way
Added coordinates for the chessboard with a new function called print_coordinates. I also added a bouncer function to check if a piece is trying to move to a square that has a piece of the same color. If it’s trying to capture its own piece, it doesn’t allow the move. I implemented this by creating a new function called is_legal_move.
Created functions for repeated tasks.
Making fully fledged chess inside Python Turtle.