ChessBoard - 2.02
John Eriksson (wmjoers)
ChessBoard is a Python implementation of the FIDE laws of chess. The main goal is to implement all applicable rules in a simple, straightforward way. The intention is not to be fast but to be easy to understand and to be complete. Many other implementation has known problems with castling, stalemate or other more or less special rules.
- The moves of the pieces
- En passant
- Check detection
- Checkmate detection
- Stalemate detection
- Draw by the fifty moves rule detection
- Draw by the three repetitions rule detection
- Get valid locations support
- Imoprt and export of Forsyth-Edwards Notation strings.
- Add text moves in the AN, SAN and LAN standards.
- Export moves in the AN, SAN and LAN standards.
- Undo and Redo.
- Goto a specified move.
Unpack the source and start example with "python ChessClient.py"
- Left - Undo last move.
- Right - Redo move.
- F - Print current board as FEN.
- A - Print all moves as Algebraic Notation.
- S - Print all moves as Standard Algebraic Notation.
- L - Print all moves as Long Algebraic Notation.
- Added the method getLastMove()
- Changed the behavior of the promotion value. The promotion value set by setPromotion is always remembered until
setPromotion(0) resets it.
- Added the method getPromotion() to get the current promotion value.
- Added the method getLastMoveType() to indicate if the last move was a "special move" like en passant or castling.
- Fixed a bug in getLastTextMove(...). It now returns the correct code for castling.
- Fixed a bug in the addMove() method. It pushed the state before it determined the game result causing it to loose the game result when using undo redo.
click to view original size
Pygame.org account Comments
If you wish to leave a comment with your pygame.org account, please sign in first.
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
Dec 5, 2013
Dec 3, 2013
Dec 1, 2013
Nov 30, 2013
Nov 28, 2013
Nov 27, 2013
Nov 25, 2013
Nov 19, 2013
Nov 17, 2013
Nov 16, 2013
Nov 14, 2013