From 074822f39b26f648ace24cd105f15c4377e1007a Mon Sep 17 00:00:00 2001 From: "Brandon C. Irizarry" Date: Thu, 23 Apr 2026 16:22:50 -0400 Subject: feat: include some logging --- main.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'main.go') diff --git a/main.go b/main.go index d6e70f6..f561be4 100644 --- a/main.go +++ b/main.go @@ -36,6 +36,7 @@ type Score struct { func game(numPlayers, faces int) { // Get the game's winning number by throwing the die once. winningNumber := throwDie(faces) + fmt.Printf("Winning number is %d\n", winningNumber) // The scores channel communicates the number of turns a // player took to hit the winning number. @@ -53,6 +54,8 @@ func game(numPlayers, faces int) { for { score++ outcome := throwDie(faces) + fmt.Printf("Player %d threw a %d\n", id, outcome) + if outcome == winningNumber { scores <- Score{id: id, score: score} } -- cgit v1.2.3