X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=c-version%2Fsrc%2Freplay;fp=c-version%2Fsrc%2Freplay;h=9e5c196eb1b45217bfae67dbe3bc013ac7984f99;hp=0000000000000000000000000000000000000000;hb=1dc3e2e56bd836aa1c9d45417222b4fed6d34c0e;hpb=16a5bbd86d12644c1a613e61e990f76b16a567f0 diff --git a/c-version/src/replay b/c-version/src/replay new file mode 100755 index 0000000..9e5c196 --- /dev/null +++ b/c-version/src/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