Skip to content

Commit

Permalink
Use "tie" instead of "draw"
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben9922 committed Apr 23, 2023
1 parent c81d99b commit a1d9112
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ func createQuitConfirmationView(maxWidth int) string {
func createGameOverView(m model, scores map[player]int, maxWidth int) string {
var resultString string
if scores[LightPlayer] == scores[DarkPlayer] {
resultString = "Draw!"
resultString = "Tie!"
} else if scores[DarkPlayer] > scores[LightPlayer] {
resultString = fmt.Sprintf("%s won!", DarkPlayer)
} else if scores[LightPlayer] > scores[DarkPlayer] {
Expand Down Expand Up @@ -629,7 +629,7 @@ func createTurnText(currentPlayer player) string {
func createGameStatusText(scores map[player]int) string {
var scoreStringBuilder strings.Builder
if scores[LightPlayer] == scores[DarkPlayer] {
scoreStringBuilder.WriteString("Draw")
scoreStringBuilder.WriteString("Tie")
} else if scores[DarkPlayer] > scores[LightPlayer] {
scoreStringBuilder.WriteString(fmt.Sprintf("%s winning!", DarkPlayer))
} else if scores[LightPlayer] > scores[DarkPlayer] {
Expand Down

0 comments on commit a1d9112

Please sign in to comment.