Inspiration
We took inspiration from several simple yet engaging board games, and we went with chess. It is fun, but effective. We love watching chess :)
What it does
The website is able to play chess with two players and also reset the game for a new match. Endgame works.
How we built it
We found a python library that already has the rules of chess implemented already, so that saved us a lot of time. Getting the images to load was a bit of a hassle, especially when gunicorn rendered the images improperly so we had to refactor a lot of things. We went with the Flask web development library to create the website, and managed to get python and javascript to communicate with each other - python handling the backend and the workings of the game whilst javascript took inputs from the client and server to display what's happening. We met a few bugs along the way but in the end we managed to get the game functioning. We used git to commit to the project, and it was super efficient for us to communicate and work together.
Challenges we ran into
Hosting the website was a challenge as some scripts didn't run as we expected it to. In addition, we ran into an issue with indicators where the indicator won't go to the right place, and the pieces moved were the wrong colours, and sometimes they won't even move at all. Several internal server issues, but we managed to swiftly fix them.
Accomplishments that we're proud of
The board generation worked without much problem, which was pretty unexpected - especially for me. Another thing was when the game actually worked, and we had a functioning game to build on top of.
What we learned
We learned a lot about JavaScript and Flask, especially how to effectively have them communicate in order for the game to work and the state of the game to show on the webpage. Initially we thought of creating a file to communicate with, but we managed to use Flask in order to ping routes and use JSON to load the game and reset, etc.
What's next for Chess
We were hoping to add networking so that you can find players online and play matches, but because of several issues with the code we had to address sadly we delayed that prospect.
Built With
- chess
- flask
- git
- html
- javascript
- python
- render
Log in or sign up for Devpost to join the conversation.