diff options
| author | Brandon C. Irizarry <brandon.irizarry@gmail.com> | 2026-04-23 17:50:48 -0400 |
|---|---|---|
| committer | Brandon C. Irizarry <brandon.irizarry@gmail.com> | 2026-04-23 17:50:48 -0400 |
| commit | db36098d7971cc4e6441a83e24aec4f6d79152b9 (patch) | |
| tree | 54cabf17936afe0bea231d669f039c06eafd9c20 | |
| parent | 6bd2615d4ee8aac13acec896631ddf349de36b4b (diff) | |
docs: edit README and add example game output
| -rw-r--r-- | README.md | 41 |
1 files changed, 33 insertions, 8 deletions
@@ -30,16 +30,41 @@ example, 6, 12, etc.; even a coin can count as a die in this case.) One of the players (picked arbitrarily) rolls their die once. The number that it shows becomes the winning number. Each player is then -tasked with rolling their die until they hit that number. +tasked with rolling their die until they hit that number. The player +who hits the number with the fewest number of rolls wins. In case of a +tie, the first one to roll the winning number wins. For example, three players get together and decide to use an ordinary -six-sided die each. The die is rolled, resulting in a 4. The players +six-sided die each. The die is rolled, resulting in a 4. The players then each go off into their corners and roll their die until they hit -a 4, upon which they can declare victory. +a 4. Player 1 does it in three rolls, Player 2 in one (lucky!), and +Player 3 in seven. Player 2 wins. -The player to hit the number in the smallest number of turns, wins. In -the case of a tie, the first one to roll the winning number wins. For -example, if player 1 hits the number in three turns, then player 2 -hits the number in two turns, then player 3 also in two turns, player -2 wins. +# An Example Session +``` +$ go run . +Welcome to the game +There are 2 players, each with a 6-sided die +Winning number is 6 +Player 1 threw a 4 +Player 2 threw a 1 +Player 1 threw a 2 +Player 2 threw a 4 +Player 2 threw a 3 +Player 1 threw a 3 +Player 2 threw a 2 +Player 1 threw a 3 +Player 2 threw a 3 +Player 1 threw a 4 +Player 2 threw a 2 +Player 1 threw a 1 +Player 1 threw a 4 +Player 2 threw a 6: the winning number! Their score is 7 +Player 1 threw a 1 +Player 1 threw a 3 +Player 1 threw a 5 +Player 1 threw a 6: the winning number! Their score is 11 +Player 2 won with a score of 7 +Thanks for playing! +``` |
