From b4f917b43935fd7402b5d0ca4697ca544a87abba Mon Sep 17 00:00:00 2001 From: "Brandon C. Irizarry" Date: Thu, 23 Apr 2026 16:49:38 -0400 Subject: style: fix remaining "score" names --- main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index f4b837b..c9a220c 100644 --- a/main.go +++ b/main.go @@ -74,15 +74,15 @@ func game(numPlayers, faces int) { close(finishedPlayers) }() - minFinishedPlayer := Player{score: math.MaxInt} + minPlayer := Player{score: math.MaxInt} - for score := range finishedPlayers { - if score.score < minFinishedPlayer.score { - minFinishedPlayer = score + for player := range finishedPlayers { + if player.score < minPlayer.score { + minPlayer = player } } - fmt.Printf("Player %d won with a score of %d\n", minFinishedPlayer.id, minFinishedPlayer.score) + fmt.Printf("Player %d won with a score of %d\n", minPlayer.id, minPlayer.score) fmt.Println("Thanks for playing!") } -- cgit v1.2.3