See a video of this project: https://drive.google.com/file/d/1DbjGC7kk76PV6LnouRJXw8jAY3XVmnjU/view?usp=sharing
This is a basic chess program written in python, it allows all basic legal moves and some special moves. moves that this program does not support: En passant and pawn promotion to a piece other than Queen.
- All pieces can only move to squares they are allowed to - which are highlighted red for a selected piece.
- A piece cannot move into a square that is occupied by a piece of the same color.
- A pawn is allowed to move 2 squares on its first move, after that, the pawn can only move forward 1 square.
- A pawn can move diagnally only when there is a piece of the opposite color to be taken.
- Pawn promotes to a queen when it reaches the end of the board.
- The King's square is highlighted red when the King is in check.
- The King cannot castle after moving.
- Whether or not a piece can block a check by moving in front of the king.
- Whether or not the squares between a king and a rook are attacked before castle (unless the square is the king's destination square for castling).
- Whether or not a piece's movement would put the king in check.