-
Notifications
You must be signed in to change notification settings - Fork 0
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
Extrapoints #34
base: master
Are you sure you want to change the base?
Extrapoints #34
Conversation
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.
Thanks. Bonus achievement: add some tests 😀 😝
@@ -264,6 +265,12 @@ enum Rank { | |||
} | |||
|
|||
|
|||
enum TrickEvent { | |||
FOXCAUGHT = 0; |
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.
I'd prefer sepating words by underscores (in line with the style guide):
FOX_CAUGHT
DOPPELKOPF_SCORED
...
ep := ExtraPoint{Doppelkopf, trick.Winner, i} | ||
ans = append(ans, ep) | ||
} | ||
} | ||
return ans | ||
} | ||
|
||
func fuechse(g *game.Game) []ExtraPoint { | ||
//logic without party information | ||
func maybeFoxCaught(player game.Player, trick *game.Trick) bool { |
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.
note: in the doppelkopf app I use regularly, party information is consirede public once a player has played a queen of clubs, which is then used to emit the „fox caught“ event more precisely. However in real games it is not uncommon to forget who played a »Dulle«, I think this should also be possibility in the app. ;-)
But at least when contra/re etc. are announced that information could be used (in a separate PR, of course) to add constraints to this function.
added a message for scored (or possible scored) extrapoint