Skip to content

Latest commit

 

History

History
38 lines (24 loc) · 1.38 KB

README.md

File metadata and controls

38 lines (24 loc) · 1.38 KB

Chess Game

This is a web-based chess game written in JavaScript that allows players to play against computer. The program uses HTML, CSS, and JavaScript.

Features

  • 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

Requirements

  • A web browser that supports JavaScript

How to Use

  1. Download the program files or clone the repository to your computer.
  2. Open the index.html file in a web browser.
  3. To start a new game, click on the "New Game" button.
  4. The white player starts first. Click on a piece to select it, and then click on a highlighted square to move it.
  5. If a move is not valid, an error message will be displayed, and the player can try again.
  6. 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.
  7. The game ends when one player puts the other's king in checkmate.
  8. A message will be displayed to indicate the winner, and the game can be reset by clicking on the "New Game" button.

Show your support

Don't forget to ⭐ the repo if you like it 😊