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

Chess in Python Turtle 🐢

  • 6 Devlogs
  • 5 Total hours

A fully functioning chess game in pure Python Turtle.

Open comments for this post

30m 6s logged

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!

Replying to @Mehmet

0
Open comments for this post

55m 31s logged

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:

  1. Two-step support for pawns going on their first move.
  2. Logic so that pawns cannot capture pieces directly in front of them.
  3. Support for pawns capturing pieces only on their front diagonals.

Follow along if you want to see if I ever get out of this!!! :D

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:

  1. Two-step support for pawns going on their first move.
  2. Logic so that pawns cannot capture pieces directly in front of them.
  3. Support for pawns capturing pieces only on their front diagonals.

Follow along if you want to see if I ever get out of this!!! :D

Replying to @Mehmet

0
Open comments for this post

59m 30s logged

Added legal moves and support for the knight, king, rook and pawn. The bishop is on the way

Added legal moves and support for the knight, king, rook and pawn. The bishop is on the way

Replying to @Mehmet

0
Open comments for this post

47m 2s logged

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.

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.

Replying to @Mehmet

0

Followers

Loading…