Skip to content

This is a web-based chess game written in JavaScript that allows players to play against computer.

Notifications You must be signed in to change notification settings

vishalkrishna8/chess-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 😊

About

This is a web-based chess game written in JavaScript that allows players to play against computer.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published