Skip to content

Add support for Dice rolling games #82

@andrewjmeier

Description

@andrewjmeier

I think that the general flow of the state machine should be something like: roll the dice -> make a move -> pause and allow player to make other decisions -> turn ended -> next player

Implementation of this is not exactly straightforward. I don't want to make this super complicated to the point where it would have been better for the user to write his own state machine. What does concern me is that it's very hard to know what to do with the roll. We could roll the dice and then call a method of the game where the user writes what happens when the dice roll, but that only works if it's automatic. If the player then clicks on which token he wants to move, we need to do that...

Maybe we want two types of games the same way we had checkers and connect 4. Where we have games that know how to make the move after the dice are rolled and games that require user input after the dice are rolled? Then, there can probably also be another flag or something that allows the pause for additional player decisions at the end of his turn...

@JamesEVerhagen This certainly needs a lot of architectural thought so maybe we can try and brainstorm at some point. @qstearns is usually good at the architecture stuff.

  • Create new state machine for dice games
  • Determine how to handle the two types of dice games stated above
  • Determine how to handle games that allow the user to do other actions after rolling the dice (i.e. trading in monopoly)
  • Build a dice game
  • Convert Monopoly to use the new dice state machine (if we determine that's possible)
  • Convert Settlers (if possible)

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions