Inspiration

During the pandemic, we realized how important in person interactions are and how important hobbies are in facilitating these interactions. After going over some ideas, our team found that board games allow people to have a hobby and meet up with others in person. However, due to the pandemic it became impossible to meet in person and play board games. For our project, we decided to create a chess game with a more relaxed and personal take so that people can continue to play board games with each other even when separated.

What it does

We made a digital chess game in which two players can play one another. We display a chessboard and allow players to take turns by clicking on the piece they want to move and then clicking where they want to move it. The game follows most traditional chess rules and ends whenever a king gets captured. Whenever a player is losing, encouraging words are displayed to them above the board.

How we built it

We coded the chess game in Python and used the module Pygame in order to display an interactive user interface with a chess board. In Python we use a list in order to store all the pieces current positions, and whenever a user attempts to move a piece, we check if the move they made is valid based on attributes of the list we have stored. After updating the list in Python, all attributes are updates and we update the display using Pygame.

Challenges we ran into

Both of us are new to programming and have never designed a project of this scope before, so we ended up running into a lot of planning issues as well as coding issues. Although we did have a general plan for of the program, a lot of pieces had more conditions than we realized, and we ended up having to go back and rework a few functions such as canMove() and main() so that the code actually ran in the correct order.

Accomplishments that we're proud of

An accomplishment we're proud of is that we were able to design pieces so that they could not "jump" over other chess pieces. This was difficult to solve as tracing pieces such as the bishop, rook, and queen became increasingly complicated and we hadn't recognized this as a problem at first, so recognizing the problem and debugging it was satisfying. Another accomplishment that was satisfying was implement the check mechanic, which alerts players when their king is in check. This was really difficult to do because as we could not find a simple way to do this and had to check every position to see if it resulted in check before a move was made.

What we learned

As both of us are relatively new to programming, we were able to learn a lot from this project. Neither of us had worked with a module like Pygame before and learning how to implement it and understand the documentation became really important to make our project work. We also learned a lot about debugging and tracing references through the code, especially as it reached a larger scale.

What's next for No-Stress Chess

In the future, we would like to add more functionality to the program as we had a lot of ideas for the program and ran out of time. Some of the things we would like to add are an improved user interface so that moves a user can make are more obvious, and animations for pieces as they move. We would also like to add music to make the program more relaxing.

Built With

Share this project:

Updates