only report match winners
This commit is contained in:
parent
016d297f10
commit
9a02235eba
@ -240,7 +240,7 @@ func (g *Match) DTO(id player.ID) serve.Game {
|
||||
blank = len(g.shells) - live
|
||||
}
|
||||
w := serve.NoWinner
|
||||
switch g.RoundWinner() {
|
||||
switch g.MatchWinner() {
|
||||
case &g.players[0]:
|
||||
w = serve.DealerWins
|
||||
case &g.players[1]:
|
||||
|
@ -9,7 +9,7 @@ type Game struct {
|
||||
Players [2]Player `json:"players"`
|
||||
// Action indicates the previous action taken in the game.
|
||||
Action string `json:"action"`
|
||||
// Winner indicates the winner of the current round, if any.
|
||||
// Winner indicates the winner of the match, if any.
|
||||
Winner Winner `json:"winner,omitempty"`
|
||||
// Round is the current round.
|
||||
Round int8 `json:"round"`
|
||||
|
@ -15,7 +15,7 @@ export interface Game {
|
||||
| "Lens" | "Cig" | "Beer" | "Cuff" | "Knife"
|
||||
| "DealerConcedes" | "ChallengerConcedes"
|
||||
/**
|
||||
* Round winner.
|
||||
* Match winner.
|
||||
*/
|
||||
winner?: 0 | 1 | null
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user