Skip to content

Commit

Permalink
fix tie edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
loan-mgt committed May 28, 2024
1 parent 156eeb9 commit b548be2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/services/game.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func GetWinner() (player *types.Player, tie bool, err error) {
return nil, false, errors.New("one or more player has not selected a move")
}

if gameInstance.Player1.Move == gameInstance.Player2.Move {
if *gameInstance.Player1.Move == *gameInstance.Player2.Move {
return nil, true, nil
}

Expand Down

0 comments on commit b548be2

Please sign in to comment.