pick more sensible file names
This commit is contained in:
parent
cbde4fcde4
commit
4e10cd3a72
|
@ -2,10 +2,10 @@ Simple card game.
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
`./play.bash`
|
`./fire`
|
||||||
|
|
||||||
Play a single game.
|
Play a single game.
|
||||||
|
|
||||||
`./stats.bash`
|
`./stats`
|
||||||
|
|
||||||
Play a number of games and look at the stats.
|
Play a number of games and look at the stats.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Usage:
|
# Usage:
|
||||||
# ./play.bash
|
# ./fire
|
||||||
|
|
||||||
alice_sum=0
|
alice_sum=0
|
||||||
bob_sum=0
|
bob_sum=0
|
|
@ -1,13 +1,13 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
# ./stats.bash
|
# ./stats
|
||||||
# or
|
# or
|
||||||
# ./stats.bash NUM_SIMULATIONS
|
# ./stats NUM_SIMULATIONS
|
||||||
|
|
||||||
for ((i=0; i < ${1:-100}; i++))
|
for ((i=0; i < ${1:-100}; i++))
|
||||||
do
|
do
|
||||||
./play.bash
|
./fire
|
||||||
done | awk '
|
done | awk '
|
||||||
/^[[:alnum:]]+ vinner!$/ {
|
/^[[:alnum:]]+ vinner!$/ {
|
||||||
win[$1]++
|
win[$1]++
|
Loading…
Reference in New Issue