Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Extrapoints #34

wants to merge 2 commits into from

Conversation

Hilke
Copy link
Collaborator

@Hilke Hilke commented Jun 18, 2021

added a message for scored (or possible scored) extrapoint

Copy link
Owner

@supermihi supermihi left a 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;
Copy link
Owner

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 {
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants