Skip to content

This is a simple implementation of a chess game using Python and the Pygame library. It allows two human players to play against each other on a graphical interface.

Notifications You must be signed in to change notification settings

Rajesh-Reddy1/Chess-Game-Two-player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Chess-Game-Two-player

Chess Game

This is a simple implementation of a chess game using Python and the Pygame library. It allows two human players to play against each other on a graphical interface.

Features

  • Classic chess rules and gameplay
  • Highlights valid moves for the selected piece
  • Keeps track of move history and displays it in a move log panel
  • Supports undoing moves and resetting the game
  • Detects checkmate and stalemate conditions

Dependencies

  • Python 3.x
  • Pygame library

Installation

  1. Make sure you have Python 3.x installed on your system.
  2. Install the Pygame library by running the following command:
    pip install -r requirements.txt
    
  3. Clone this repository or download the source code files.
  4. Run Main.py in Terminal

How to Play

  1. Run the main.py file using Python.
  2. The game window will open, displaying the chessboard.
  3. The white player always starts first.
  4. To make a move, click on the piece you want to move and then click on the destination square.
  5. Valid moves will be highlighted in yellow when a piece is selected.
  6. The move log panel on the right side displays the history of moves.
  7. Press the 'z' key to undo the last move.
  8. Press the 'r' key to reset the game.

Enjoy playing chess!

About

This is a simple implementation of a chess game using Python and the Pygame library. It allows two human players to play against each other on a graphical interface.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages