projects
/
super-star-trek.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Put a timestamp an email in lofiles. Add the replay debugging script.
[super-star-trek.git]
/
src
/
sst.py
diff --git
a/src/sst.py
b/src/sst.py
index bfa8abce995372f78dac07a5b4b6efe91e76a8a8..74dcbaa3aee8ab27ce8b09f73e4e642330a0c2ca 100644
(file)
--- a/
src/sst.py
+++ b/
src/sst.py
@@
-180,7
+180,7
@@
more:
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"
@@
-1057,11
+1057,11
@@
def movetholian():
for i in range(QUADSIZE):
if game.quad[0][i]!=IHWEB and game.quad[0][i]!=IHT:
return
for i in range(QUADSIZE):
if game.quad[0][i]!=IHWEB and game.quad[0][i]!=IHT:
return
- if game.quad[QUADSIZE
][i]!=IHWEB and game.quad[QUADSIZE
][i]!=IHT:
+ if game.quad[QUADSIZE
-1][i]!=IHWEB and game.quad[QUADSIZE-1
][i]!=IHT:
return
if game.quad[i][0]!=IHWEB and game.quad[i][0]!=IHT:
return
return
if game.quad[i][0]!=IHWEB and game.quad[i][0]!=IHT:
return
- if game.quad[i][QUADSIZE
]!=IHWEB and game.quad[i][QUADSIZE
]!=IHT:
+ if game.quad[i][QUADSIZE
-1]!=IHWEB and game.quad[i][QUADSIZE-1
]!=IHT:
return
# All plugged up -- Tholian splits
game.quad[game.tholian.kloc.i][game.tholian.kloc.j]=IHWEB
return
# All plugged up -- Tholian splits
game.quad[game.tholian.kloc.i][game.tholian.kloc.j]=IHWEB
@@
-3432,7
+3432,7
@@
def prouts(line):
time.sleep(0.03)
proutn(c)
if game.options & OPTION_CURSES:
time.sleep(0.03)
proutn(c)
if game.options & OPTION_CURSES:
-
wrefresh(curwnd
)
+
curwnd.refresh(
)
else:
sys.stdout.flush()
if not replayfp or replayfp.closed:
else:
sys.stdout.flush()
if not replayfp or replayfp.closed:
@@
-6517,6
+6517,7
@@
def debugme():
atover(True)
if __name__ == '__main__':
atover(True)
if __name__ == '__main__':
+ import getopt, socket
try:
global line, thing, game, idebug
game = None
try:
global line, thing, game, idebug
game = None
@@
-6568,6
+6569,8
@@
if __name__ == '__main__':
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)