X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=replay;fp=replay;h=9e5c196eb1b45217bfae67dbe3bc013ac7984f99;hp=0000000000000000000000000000000000000000;hb=5d386eeefb0288ed4037555ae41cd423f4a8d3dc;hpb=eb1a46f740c64b52a9eea0a08959d46e41189510 diff --git a/replay b/replay new file mode 100755 index 0000000..9e5c196 --- /dev/null +++ b/replay @@ -0,0 +1,14 @@ +#!/bin/sh +# Replay the last SST game. With arg, use only that many lines of the log +# +# Because the replay log captures the random-number seed, +# repeating this any number of times should produce identical games, +# unless the code changes. +# +if [ $1 ] +then + head -n `expr $1 + 2` replay.log +else + mv /usr/tmp/sst-input.log replay.log +fi +python sst.py -t -r replay.log