summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon C. Irizarry <brandon.irizarry@gmail.com>2026-04-23 16:39:24 -0400
committerBrandon C. Irizarry <brandon.irizarry@gmail.com>2026-04-23 16:39:24 -0400
commit2b256bab45712e5f0ba883bb40a99ab29682defc (patch)
treeaa3274c61789c99a038eb4d50984389fd6de216f
parent501b9e7bbdff00b82c588913dab2155c03457345 (diff)
feat: log when the winning number is thrown
-rw-r--r--main.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/main.go b/main.go
index 29e07cf..beae39f 100644
--- a/main.go
+++ b/main.go
@@ -58,6 +58,7 @@ func game(numPlayers, faces int) {
fmt.Printf("Player %d threw a %d\n", id, outcome)
if outcome == winningNumber {
+ fmt.Printf("Player %d threw the winning number! Their score is %d\n", id, score)
scores <- Score{id: id, score: score}
return
}