This is a web-based chess game written in JavaScript that allows players to play against computer. The program uses HTML, CSS, and JavaScript.
- Standard chess rules and movements
- Move validation and error handling
- Checkmate detection and game end condition
- Reset button to start a new game
- Visual indication of selected pieces and possible moves
- A web browser that supports JavaScript
- Download the program files or clone the repository to your computer.
- Open the
index.html
file in a web browser. - To start a new game, click on the "New Game" button.
- The white player starts first. Click on a piece to select it, and then click on a highlighted square to move it.
- If a move is not valid, an error message will be displayed, and the player can try again.
- If a player's king is in check, a message will be displayed to indicate it. The player must move the king or another piece to get out of check.
- The game ends when one player puts the other's king in checkmate.
- A message will be displayed to indicate the winner, and the game can be reset by clicking on the "New Game" button.
Don't forget to ⭐ the repo if you like it 😊