- Run
docker compose up
. - Open localhost:8080 in your browser—this is the first player’s game perspective.
- Create a new game and copy game ID from an input field.
- Open localhost:8080 in another browser tab—this is the second player’s game perspective.
- Paste game ID in an input field and click Connect.
- The game has started. Use board buttons to make turns. Switch browser tabs to switch between players.
- Domain objects are immutable—thus they’re thread safe and easy to reason about.
- Game logic is presented as a set of rules, connected into a Chain of Responsibility. It allows us to keep the code neat and clean and to test small chunks of logic separately.
- Redis is used to store game state as a serialized string. If at some point we need more sophisticated approach (e.g. to search games by their status), we may want to switch to MongoDB or even to RDB.
- Frontend is quite primitive—it’ll be easy to switch to a prettier one because API is documented with Swagger.
- In a production environment we’ll want to pay attention to API’s security. However, I decided that this topic is out of this assignment’s scope.