Inspiration
We thought it would be awesome to use the most famous code hosting platform in an interactive way that it most definitely is not intended for.
What it does
You can play chess in read me's by clicking on the square you want to move, then the page refreshes and you are shown the possible moves, you can make one of these moves and then the other player can play. Then you simply play a game of chess! Then when someone wins you can reset and play again!
How we built it
We used links on images to link to the backend which is a codespace in the same repository which then redirects back to the same readme, this allows the backend to do processing and forcibly update the board state using a github commit.
Challenges we ran into
Displaying an updating board is very hard as github caches all images, so we had to invalidate the cache every time by commiting to the repo from the backend after every move to add a new time query parameter. Github README's are also really restrictive, they remove lots of useful html, most css and all javascript, meaning displaying the board and even having buttons is challenging.
Accomplishments that we're proud of
The UI looks good and the board resembles a real chess board.
What we learned
Static pages are not good for dynamic content
What's next for Github README Chess
Adding forfeit and draw options, also Minecraft
Log in or sign up for Devpost to join the conversation.