Now that data is captured for every aspect for a chess game, I am going to continue pursuing short term development plans.
En Passant allows a pawn to capture after moving diagonally behind an opponents piece. The highlighted square in the graphic here shows that the white pawn can move diagonally and then capture the black pawn behind it.
This screen shot shows that the captured black pawn is no longer on the board after the en passant move takes place.
This Pygame development I started in December of 2023 because of an interest in learning Python (and) I have always thought Chess was fun. It quickly became an obsession in completing the tutorials below... It has not stopped there though, I don't know where this will end up, it's only for fun, so it doesn't have to stop.
- https://www.youtube.com/watch?v=X-e0jk4I938&t=7481s
- https://www.youtube.com/watch?v=s2Dd_obh3fM&t=134s
Those two tutorials were a great foundation to begin experimentation and learning in Python. Once they were completed, I began to start coding ideas of my own for the game, and I still am developing new features.
Obvious changes in the game's interface:
- listing out the moves made through the game next to the pieces that were captured
New coding features include:
- adding (and inserting into) a "games" table for each game.
Select * from games ORDER BY id DESC LIMIT 10 shows that the games table is probably the least imaginative table but it is the base building block upon the games data is started with.
- adding (and inserting into) a "gameMoves" table for each move
Select * from gameMoves ORDER BY id DESC LIMIT 10 shows that game successfully creates a move associated with a specific game that includes the piece, starting position, ending position, and color.
- adding (and inserting into) a "gameCaptures" table for each capture
Select * From gameCaptures limit 10 shows that game successfully logs captures when playing the game.
- adding (and inserting into) a "gameChecks" table for each check
- adding (and inserting into) a "gamePromotions" table for each pawn promotion.
select * from gamePromotions ORDER BY id DESC LIMIT 10 shows that there is room for improvement here, the ids for the promotion do not increment as they should due to the game looping while the insert is happening.
- adding (and inserting into) a "gameCastling" table for each castle. There is room for improvement here, would like to (possibly) capture the starting position of the king and rook and then their position after they complete the castle maneuver
select * from gameCastling ORDER BY id DESC LIMIT 10 shows that castle moves are captured and associated with a game move id.
- adding (and inserting into) a "gamesCompleted" table for every completed game.
- Fixed Game Reset after Forfeit button is clicked!!
- Load a list of games from persistent Data
- Select a game from the list and load all game moves played already.
- Give option to save game or delete it.
- Give an option to re-name a game.
- Give an option to add notes to the game.
- Install Python 3.12.0 or newer.
- Install MySQL 8.0.34 or newer.
- Create a db_connection.py file in the root of the pythonchess folder.
- Copy and paste stored_procedures.sql and run the structured queries.
- Run the main.py file to start the game.













