Browse Source

Fix score message

master
Trevor Slocum 2 years ago
parent
commit
5286caed98
  1. 4
      game.go

4
game.go

@ -558,9 +558,9 @@ func (g *Game) printScoring() { @@ -558,9 +558,9 @@ func (g *Game) printScoring() {
cribscore, cribscoreresults := cribbage.Score(cribbage.ShowCrib, g.Crib, g.Starter)
if g.Dealer == player {
gameprinted = append(gameprinted, fmt.Sprintf("Your hands scored %d (%d hand, %d crib) - Your opponent's hand scored %d", playerscore, cribscore, opponentscore))
gameprinted = append(gameprinted, fmt.Sprintf("Your hands scored %d (%d hand, %d crib) - Your opponent's hand scored %d", playerscore+cribscore, playerscore, cribscore, opponentscore))
} else {
gameprinted = append(gameprinted, fmt.Sprintf("Your hand scored %d - Your opponent's hands scored %d (%d hand, %d crib)", playerscore, opponentscore, cribscore))
gameprinted = append(gameprinted, fmt.Sprintf("Your hand scored %d - Your opponent's hands scored %d (%d hand, %d crib)", playerscore, opponentscore+cribscore, opponentscore, cribscore))
}
gameprinted = append(gameprinted, "Starter "+g.Starter.String())

Loading…
Cancel
Save