Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MuhammadAhmadMirza committed Nov 16, 2024
1 parent 07f8a58 commit 127ddff
Show file tree
Hide file tree
Showing 39 changed files with 2,100 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist/
src/logs/
src/modules/__pycache__/
src/utilities/__pycache__/
36 changes: 34 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,34 @@
# Chess
an implentation of the rules of chess in python along with stockfish engine
# Chess Game

This project is an implementation of the **Rules of Chess** in Python, using **Pygame** for the graphical interface. The game supports various features such as **FEN Import/Export**, **Engine Analysis** with **Stockfish**, customizable **depth for engine analysis**, **Flip POV**, and a **Light/Dark theme** toggle. It was made for my educational purposes so its not pretty. It is similar although not identical to this: [github repo](https://github.com/mikolaj-skrzypczak/chess-engine)

![Chess](src/assets/images/demo.png)

## Features

- **FEN Import/Export**: Import and export the board state using the **Forsyth-Edwards Notation (FEN)** format.
- **Engine Analysis**: Utilize the **Stockfish chess engine** to analyze the game position with customizable analysis depth.
- **Undo/Redo**
- **Flip POV**: Flip the board's point of view to play as either player.
- **Light/Dark Theme**: Toggle between light and dark themes for the user interface.

## Prerequisites

- **Python 3.x**

### Required Libraries

- `pygame`
- `pyperclip`
- `psutil`
- `chess`

To install the required libraries, you can use the following command:

```bash
pip install -r requirements.txt
```

## License

This project is licensed under the MIT License - see the [LICENSE](/LICENSE) file for details.
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pygame
chess
pyperclip
psutil
4 changes: 4 additions & 0 deletions src/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from modules.gui import main

if __name__ == "__main__":
main()
Binary file added src/assets/images/chess_icon.ico
Binary file not shown.
Binary file added src/assets/images/chess_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/copy_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/engine_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/flip_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/light_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/paste_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/pieces/bB.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/pieces/bK.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/pieces/bN.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/pieces/bQ.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/pieces/bR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/pieces/bp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/pieces/wB.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/pieces/wK.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/pieces/wN.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/pieces/wQ.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/pieces/wR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/pieces/wp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/sounds/capture.mp3
Binary file not shown.
Binary file added src/assets/sounds/castling.mp3
Binary file not shown.
Binary file added src/assets/sounds/check.mp3
Binary file not shown.
Binary file added src/assets/sounds/end.mp3
Binary file not shown.
Binary file added src/assets/sounds/illegal.mp3
Binary file not shown.
Binary file added src/assets/sounds/move.mp3
Binary file not shown.
Binary file added src/assets/sounds/promotion.mp3
Binary file not shown.
Binary file added src/assets/stockfish/stockfish.exe
Binary file not shown.
Loading

0 comments on commit 127ddff

Please sign in to comment.