/Chess-Game

Chess game written in python using PyQt5. Private project with plans to learn new language and tools.

Primary LanguagePythonApache License 2.0Apache-2.0

Chess-Game

Chess Engine made w GUI. Programme will cover the engine itself written in python, gui written in PyQt5. Gui will cover scene for party analysis, user profile, login screen, players list, settings and of course new game.

Project was not finished due to the performance of the language, lack of motivation to fight for every tear of performance and lack of time. You can play with engine 1 v 1 as black or white pieces. If you hit CTRL button you will display FEN string of current position and if hit ENTER you will see current evaluation of position from whites and blacks point of view. If you use New Game button game will reset to standard position, but if you use Switch Colors button you will change the sides of pieces and Engine will make a first move so if you see stutter do not worry.


Table Of Contents

  1. Technology Stack
  2. How to install necessary dependencies and Run Code
  3. Credits to Authors
  4. Troubleshooting

Technology Stack

  • PyQt 5.15.7,
  • Python 3.10,
  • Sass 1.54,
  • Css 3,
  • playsound 1.2.2,
  • coverage 6.5.0,
  • PyTest 1.7.3,
  • mypy 0.982,
  • NumPy 1.23.3.

How to install necessary dependencies and Run Code

  • First you need to install python for example on linux:
sudo apt install -y python3
  • If you want to edit and compile sass files you need to install:
sudo apt install -y nodejs
npm install -g sass
  • Lastly install required packages by the chess programme:
pip install -r requirements.txt
  • To create this app I used PyCharm,
  • To run this program run script located in:
Chess-Game/src/main/main.py

Return To Table Of Contents


Credits to Authors

I am not the author of those graphics and sounds and I do not claim the right of ownership over them. I use them just in educational purposes.

Chess Icon

User Icon

Play Icon

Analysis Icon

Players Icon

Profile Icon

Engine Icon

Settings Icon

Chess Pieces

Chess Sound

Return To Table Of Contents


Troubleshooting

  • I cannot use code coverage!

You have to edit run_coverage.py from this :

argv = []
for arg in sys.argv:
    if arg.startswith('-m') and arg[2:]:
        argv.append(arg[2:])
    else:
        argv.append(arg)
sys.argv = argv

To this :

argv = []
for arg in sys.argv:
    if arg.startswith('-m') and arg[2:]:
        argv.append(arg[2:])
    elif arg.startswith('--omit="'):          ## added two lines
        argv.append('--omit=' + arg[8:-1])    ##
    else:
        argv.append(arg)
sys.argv = argv

Source

  • I am getting FileNotFoundError with paths.

The problem is you have bad project settings. If you are using pycharm go to run configuration and edit Working Directory to <path to Chess-Game>/Chess-Game/src/main and it will fix this issue.

Return To Table Of Contents