summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
11ee6e5)
And a tiny tweak to io.c.
/* wait for user action -- OK to do nothing if on a TTY */
{
if (game.options & OPTION_CURSES)
/* wait for user action -- OK to do nothing if on a TTY */
{
if (game.options & OPTION_CURSES)
--- /dev/null
+#!/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
the LRSCAN command is no longer needed. (Controlled by OPTION_AUTOSCAN
and turned off if game type is "plain" or "almy".)
"""
the LRSCAN command is no longer needed. (Controlled by OPTION_AUTOSCAN
and turned off if game type is "plain" or "almy".)
"""
-import os,sys,math,curses,time,atexit,readline,cPickle,random,getopt,copy
+import os, sys, math, curses, time, readline, cPickle, random, copy
SSTDOC = "/usr/share/doc/sst/sst.doc"
DOC_NAME = "sst.doc"
SSTDOC = "/usr/share/doc/sst/sst.doc"
DOC_NAME = "sst.doc"
atover(True)
if __name__ == '__main__':
atover(True)
if __name__ == '__main__':
try:
global line, thing, game, idebug
game = None
try:
global line, thing, game, idebug
game = None
if logfp:
logfp.write("# seed %s\n" % seed)
logfp.write("# options %s\n" % " ".join(arguments))
if logfp:
logfp.write("# seed %s\n" % seed)
logfp.write("# options %s\n" % " ".join(arguments))
+ logfp.write("# recorded by %s@%s on %s\n" % \
+ (os.getenv("LOGNAME"),socket.gethostname(),time.ctime()))
random.seed(seed)
scanner = sstscanner()
map(scanner.append, arguments)
random.seed(seed)
scanner = sstscanner()
map(scanner.append, arguments)