The goal with this project is to create a fully working chess game played against an algorithm.
run with 'python chess.py'
TODO:
-
Pawn movement and taking (special)
one directiontwo steps possible first movetaking only diagonal, movement only straighten passant
-
All other pieces but king and knight general movement and taking
Rook straightBishop diagonalQueen is rook + bishopKnight is special case, can jump over pieces
-
Make piece movement that exposes the king illegal
Detect if king is exposed
-
Only move that covers the king is legal if in check
Restrict movement, detect if a piece is allowed to move
-
Use 3. logic when moving the king
Restrict king movement
-
Castling
Check if piece is blockingMove both rook and kingCheck that neither rook nor king have been moved during the gameCheck if piece is attacking in between squaresCheck if king is in check before castlingCheck if king would be in check after castling
-
Can't take king
Block enemies from taking the king
-
Check mate
Detect when it's check mate
-
Implement turns
Make Player modules that can be played be a human or by the computer
-
Implement queening
- When pawn reaches enemy back rank, make choice to have new piece
-
Implement draw detection
- When no move can be made but it's not check mate
- When only the same move can be made over and over
FIXME:
- Castling doesn't work when playing
- You shouldn't have to reselect piece when you tried to make an invalid move
- Redraw board after invalid move attempt