-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ball off table #35
Ball off table #35
Conversation
| NextShot (Pool AwaitingPlayerShot) | ||
| GameOver (Pool AwaitingStart) { winner : Player } | ||
|
||
|
||
type NextPlayerAction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the way I decided to handle different variations on PlayersFault
.
Alternatively, we could have multiple top-level variants, like this:
| PlayersFaultSpotEight (Pool AwaitingSpotEightBall)
The downside is that it would become awkward to add a PlayersFaultChooseNextAction
.
| NextShot (Pool AwaitingPlayerShot) | ||
| GameOver (Pool AwaitingStart) { winner : Player } | ||
|
||
|
||
type NextPlayerAction | ||
= SpotEightBall (Pool AwaitingSpotEightBall) | ||
-- | ChooseNextAction NextPlayerAction NextPlayerAction (List NextPlayerAction) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A new variant here, ChooseNextAction
, is the idea I have for allowing multiple actions.
Handle when a ball goes off the table.
Currently, we treat ball-off-table as pocketed.
New scenarios to consider:
TODO: