User Stories Covered:
- A user should be able to challenge another player to a game by typing their username and pressing a send request button.
- A user should see a notification if they recieve a challenge with the requester's name/username and option to accept or decline
- User should be assigned either the white or black pieces randomly
- Only the user with white pieces should be able to make the first move
- On clicking a piece all valid squares that it can move to should be shown
- A user should be able to make only valid chess moves and only when it is their turn to play
- Once a valid move is made, they should not be able to make any move out of turn
- A player should only be able to move a piece if it is theirs. They should not be able to move the opponent's piece
- Once a move is made the new piece should replace the piece that was previously on that square. The piece that was previously on the square is captured/dead
- Once a move is made the square that the piece was on originally should be cleared of the piece.
- Once a move is made, check if the other player has at least one valid move. If not, then perform check for either a stalemate or checkmate
- If a stalemate position is reached then the game state should be changed from ongoing to draw
- If a checkmate position is reached then the game state is changed to complete and the last player to make a move is the winner.
- A piece other than knight should not be able to jump over another piece
- If the king is in check the only valid moves are those that move the king to safety or block the check with another piece
- If a king is in double check or more then the king is forced to move
- A piece that is blocking the king from an attacker cannot be moved
- A piece cannot be moved to a square that is occupied by a piece of the same color
- Added functionality to inform players if their challenge is rejected
- Added functionality to inform user if opponent has disconnected
Roadmap:
- Improve the UI design
- Functionality for castling, pawn promotion, en passant
- Drag and drop pieces instead of clicking