summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go3
1 files changed, 3 insertions, 0 deletions
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}
}