aboutsummaryrefslogtreecommitdiff
path: root/challenge-104/abigail
diff options
context:
space:
mode:
authorAbigail <abigail@abigail.be>2021-03-17 16:09:34 +0100
committerAbigail <abigail@abigail.be>2021-03-17 20:14:49 +0100
commit738a471f90d3d6b10bcfe37a6deca5504e2fe39d (patch)
treef2695880d965dc88b84611b11a2ff82ef5ccc6fd /challenge-104/abigail
parent2c88265a5016c16e43c23e5ae79c7fb4ed8d841c (diff)
downloadperlweeklychallenge-club-738a471f90d3d6b10bcfe37a6deca5504e2fe39d.tar.gz
perlweeklychallenge-club-738a471f90d3d6b10bcfe37a6deca5504e2fe39d.tar.bz2
perlweeklychallenge-club-738a471f90d3d6b10bcfe37a6deca5504e2fe39d.zip
Some more notes into README for week 104, part 2
Diffstat (limited to 'challenge-104/abigail')
-rw-r--r--challenge-104/abigail/README.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/challenge-104/abigail/README.md b/challenge-104/abigail/README.md
index 43151f6ba9..8704ccbcc2 100644
--- a/challenge-104/abigail/README.md
+++ b/challenge-104/abigail/README.md
@@ -81,6 +81,14 @@ The game as given is sometimes also known as the NIM game, but it better
known as the subtraction game. With the given parameters and perfect
play, the second player always wins on the third move.
+In each of the three moves, we ask the player how many tokens she wants
+take, showing the current number of tokens. We keep asking the question
+until the player gives a valid answer (1, 2, or 3). The computer takes
+3, 2, or 1 takes, and we subtract 4 from the number of tokens.
+
+After the third move, we print that the computer has won.
+
+
### Solutions
* [AWK](awk/ch-2.awk)
* [Bash](bash/ch-2.sh)