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.
- Host: GitHub
- URL: https://github.com/mjsandagi/scholars-mate
- Owner: mjsandagi
- Created: 2023-07-22T16:19:41.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-09T21:04:21.000Z (almost 2 years ago)
- Last Synced: 2025-03-29T21:18:10.788Z (about 1 year ago)
- Topics: chess, oop, pygame, python
- Language: Python
- Homepage: https://github.com/mjsandagi/chess-ai
- Size: 276 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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!**