X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=src%2Fsst.py;h=74dcbaa3aee8ab27ce8b09f73e4e642330a0c2ca;hp=bfa8abce995372f78dac07a5b4b6efe91e76a8a8;hb=29d86fb395ca01e4a4f65f02d67f5823a4ebba11;hpb=d380c90aaabc032207ce0f298186cfa7064cf100 diff --git a/src/sst.py b/src/sst.py index bfa8abc..74dcbaa 100644 --- 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".) """ -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" @@ -1057,11 +1057,11 @@ def movetholian(): 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 - 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 @@ -3432,7 +3432,7 @@ def prouts(line): 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: @@ -6517,6 +6517,7 @@ def debugme(): atover(True) if __name__ == '__main__': + import getopt, socket 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)) + 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)