jkomoros / boardgame

An in-progress framework in golang to easily build boardgame Progressive Web Apps
Apache License 2.0
31 stars 4 forks source link

Create a more fleshed out notion of SetUp phases in server layer #754

Open jkomoros opened 4 years ago

jkomoros commented 4 years ago

Related to #752 and #753 .

Currently set up has to be done before the core engine actually starts the game logic. That requires variants to be done in the core logic, and also is pretty inflexible.

Instead, it should be done in a special Phase in the main game logic. This also allows games do to multiple "rounds" easily.

To do this, we have to have machinery for known-semantics of phases that tell the server app, "at this stage, please show this type of machinery". For example, if you're in "player selection" phase, you might show a pop-over dialog with a different renderer. And if you haven't yet seen the core game renderer, e.g. a "lobby", then you might not even pop over to it from the game creation screen yet, showing the dialog over top of hte game list.

This requires the server to know which phases allow player selection, variant selection, etc. Maybe a new method that takes a phase number and returns whether it's in player selection?

jkomoros commented 4 years ago