catanatron
catanatron copied to clipboard
Add States Navigator to UI
For visiting old game states, it goes without saying that they need to be saved somewhere. However, saving the hundreds of game states of each game is very costly if we were to use a db, even with optimizations, and the db is unnecessary overhead in my opinion. Therefore:
1- Changes to the flask server:
- remove db service from docker-compose
- remove sql code and replace it with code for reading and writing pickle files
- add debugging apis:
/info
,/games/<string:game_id>/info
2- Changes to main script:
- use pickle files for storing game states instead of a database for reduced overhead
- rename
--db
cli option to--pickle
- rename
DatabaseAccumulator
toPickleAccumulator
- remove
StepDatabaseAccumulator
3- Changes to the react app:
- add navigation buttons to ActionsToolbar for previous and next states
- add state counter and state picker
This is the best way of doing this in my opinion, but I would love to hear what you think.
closes #54.