TLDR
Adding DTOs, REST controllers, states, and transitions for TURN_BARTER_OFFER. Updating SKIP action logic so that it behaves like a no-op intruction.
Main work
- Adding REST endpoint for creating barter offers.
- Adding additional states, transitions, and glides into the
FiniteStateMachineinitialization. - Updating CLI tool and automated testing cases to try
SKIPaction on newTURN_BARTER_OFFERstate. - Tracking down bugs in behaviors of the state machine’s
Glides andAction.
Challenges
- First time revisiting this project in ~1 month. State machine design is as simple as I could make it, but still took me an hour or so to dive back into confidently.
- Bouncing between languages and tooling is tiresome. The verbosity of Java can be obnoxious after primarily writing ad-hoc Python scripts for work lately.
- There needs to be unit tests introduced next, but I also anticipate large refactoring once the full game is stable.
- Perhaps I can find some minimal ~20% code coverage that will give me ~80% confidence I’m not breaking things (80-20 rule).
- As always, this is the lowest priority thing for me at the moment, so it gets punted often and requires time to get back into.
Learnings
- I should have reviewed prior work a bit more before writing new code. I forgot I had introduced the concept of
Free Transitionsand erroneously created manyGlidesthat were unnecessary. - Conditional debugging break points are great now that I have game test scenarios that take
>15CLI commands to setup.