Move the replay debugging script iup from the C sources directory.
[super-star-trek.git] / replay
diff --git a/replay b/replay
new file mode 100755 (executable)
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` </usr/tmp/sst-input.log >replay.log
+else
+    mv /usr/tmp/sst-input.log replay.log
+fi
+python sst.py -t -r replay.log