An open API service indexing awesome lists of open source software.

https://github.com/mjsandagi/scholars-mate

Scholar's Mate is a Python implementation of chess using the Pygame library, featuring a graphical chessboard where users can engage in 1v1 "pass'n play" matches.
https://github.com/mjsandagi/scholars-mate

chess oop pygame python

Last synced: 8 months ago
JSON representation

Scholar's Mate is a Python implementation of chess using the Pygame library, featuring a graphical chessboard where users can engage in 1v1 "pass'n play" matches.

Awesome Lists containing this project

README

          

# Scholar's Mate

This is a Chess game developed using the Pygame library in Python. The game boasts a graphical chessboard where players can engage in 1v1 "pass'n play" matches.

## Table of Contents

- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [Game Controls](#game-controls)

## Features

- Graphical chessboard with intuitive controls
- Two-player mode
- Easy-to-use interface and gameplay
- A plethora of themes [green, brown, blue, grey, pink]
- Recognises castling moves as valid

## Installation

1. Make sure you have Python installed on your computer. If not, download and install Python from the official website: [https://www.python.org/downloads/](https://www.python.org/downloads/)

2. Clone this repository to your local machine using Git or download it as a ZIP file and extract it.

3. Open a terminal and navigate to the project's root directory.

4. Install the required dependencies by running the following command:

```bash
pip install pygame
```

## Usage

1. After completing the installation steps, navigate to the project directory in a terminal.

2. Run the following command to start the Chess game:

```bash
python src/main.py
```

3. The game window will open, showing the chessboard and pieces.

4. Use the mouse to click and drag the chess pieces to make your moves.

## Game Controls

- **Mouse Click:** Select a chess piece and move it by dragging it to the desired square.

- **Right Click:** Deselect a piece (unselect the current selection).

- **"T" key:** Changes the board theme.

- **"R" key:** Restarts the game.

## File Structure

- **`game.py`**: Manages game state.
- **`main.py`**: Runs the game loop.
- **`board.py`**: Handles the board and pieces.
- **`dragger.py`**: Manages piece dragging.
- **`square.py`**: Defines board squares.
- **`move.py`**: Manages moves.
- **`config.py`**: Configures themes and sounds.
- **`const.py`**: Contains constants.

Enjoy playing Chess and have fun! If you encounter any issues or have suggestions for improvements, feel free to open an issue or create a pull request. **Buena suerte!**