TLDR
Cleaned up state machine structure / logic and added “roll for order” functionality. Increased “test coverage” by writing additional script files to run against the REST API’s CLI tool.

Main work
- Added structure to the
PlayerandGameStatemodels to hold playerjoinOrder, which decides the player’s color during the game. - Updating REST controller and CLI tool to accept new
ROLLcommand. - Continuing to refine the FSM implementation.
Challenges
- Continuing to make OOP design choices based on FSM progress. Difficult to decide which patterns are appropriate to avoid under/over engineering.
Learnings
- Because this is a solo project, I have been able to very cheeply fix / refactor some of my choices. For example, I made
IStateinterface originally, but updated it to an abstract class for the introduction of “Free Transitions” from states. Free Transitions always requireprotectedstate enum and transition list variables for the FSM to coordinate correctly.- Jury is still out on if this is a good design choice.
- Again, because this is a solo project, getting an MVP version of the entire game out and then refactoring is likely faster than agonizing over OOP choices or referencing Gang of Four for ideas.