This week my main focus was to combine the concepts I was working with last week to display a live and interactive board on the website. This was a difficult process since I wanted to avoid using any unnecessary APIs since it would require reading more documentation and familiarizing myself with more libraries. However, after hitting a wall and not being able to figure out any way to embed the live game into our team website I decided to look into different chessboard APIs. I came across Chessground and Chess.js – Chessground is able to display an interactive chessboard on your website and Chess.js is able to add functionality to it. After learning how to create a pretty basic working chessboard I began learning how to incorporate lichess.org API calls to create a live copy of the actual lichess.org game. In order to accomplish this I establish a seek stream, which updates the page once a game is found by passing the unique game id into the page url – which I can then access. After accessing the game id I can establish a stream of all the moves being made on that specific game. I could then make moves on the local board, POST that information to lichess and wait for the opponent to make a move and then replicate that move on the board. The state update is limited to 500ms given lichess’s latency limit, so there is some slight lag between the live game and the game displayed on the web application, but it’s not very noticeable and we had already accounted for the limit in our system requirements.
I also contributed to project management by reevaluating the schedule and establishing weekly to do lists to keep track of what needs to be accomplished on a week to week basis.
Right now, I’m not behind on the web application process – I’d say I’ve made a lot of progress on this specific portion of the project. I do need to solidify some basic parts of the website, however I feel by focusing on board functionality and communication with live games I’ll be able to allow the rest of the team to progress and integrate while I finish portions of the UI and user experience.
I want to finalize all of the play game functionalities – seeking a game against a live opponent and seeking a game against a computer. Moreover I want to add the UI for the play game page and finalize implementing the mobile view designs. I would also like to start testing communication between RPi and web application to have a concrete idea of what has to be done once we return from spring break. I want to focus on making as much progress as possible on the web application before leaving for spring break since I do not plan on working that week.
Video of current state of board:
https://drive.google.com/file/d/1umWu0pNsFbKbg3nYzfbZqnBq-ESkGbsc/view?usp=sharing