Python Final Project

Overview

This chess game implementation was made for my final project in Cogs 18, an intro to Python course. The github link for the project is listed above.

The goal of the final project was to plan and create something in python using best practices for coding, documentation, and testing. I found this project very interesting and set a goal for myself to create a chess game, and to do so without referencing any existing implementations of games, and using only official python and numpy documentation. My reason for doing this is that I believe that coding is becoming more and more important for mechanical engineers, and I knew that by setting some rules for myself and going for a complex project that I found interesting would enable me to learn python much more thoroughly. I also believe that approaching the project in that way would enable me to carry the skills to other programming languages that I may have to use in the future.


Result

The final implementation of the game enforced all of the rules of chess and also included some quality of life and testing features.

Key Features:

  • Movement disabled for pieces with no legal moves

  • Legal moves highlighted in green

  • King highlighted orange when in check

  • King highlighted light pink when check mated

  • All movement disabled when in stale mate or check mate

  • Castling implemented

  • En Passant implemented

  • Critical junctures from professional games available for practice

  • Button for easy testing of critical chess features

A short video demonstrating the program is available above. The full project is downloadable from the github link, and the code for all of the main files is viewable below.

Python Chess Github: https://github.com/vmelnik05/Cogs18-sp19-Final-Project
Run my_chess_script.py

Code


my_chess_script.py

my_classes.py

my_functions.py

my_variables.py

test_functions.py