"""
import os, sys, math, curses, time, readline, cPickle, random, copy, gettext, getpass
+version="2.0"
+
docpath = (".", "../doc", "/usr/share/doc/sst")
def _(str): return gettext.gettext(str)
torpedo(game.sector, course[i], dispersion, number=i, nburst=n)
if game.alldone or game.state.galaxy[game.quadrant.i][game.quadrant.j].supernova:
return
- if (game.state.remkl + len(game.state.kcmdr) + game.state.nscrem)==0:
+ if (game.state.remkl + len(game.state.kcmdr) + game.state.nscrem)<=0:
finish(FWON);
def overheat(rpow):
"for some recent versions of python2, the following enables UTF8"
"for the older ones we probably need to set C locale, and the python3"
"has no problems at all"
- if sys.version_info.major < 3:
+ if sys.version_info[0] < 3:
import locale
locale.setlocale(locale.LC_ALL, "")
gettext.bindtextdomain("sst", "/usr/local/share/locale")
else:
game.options |= OPTION_TTY
seed = int(time.time())
- (options, arguments) = getopt.getopt(sys.argv[1:], "r:s:tx")
+ (options, arguments) = getopt.getopt(sys.argv[1:], "r:s:txV")
for (switch, val) in options:
if switch == '-r':
try:
game.options &=~ OPTION_CURSES
elif switch == '-x':
idebug = True
+ elif switch == '-V':
+ print "SST2K", version
+ raise SystemExit, 0
else:
sys.stderr.write("usage: sst [-t] [-x] [startcommand...].\n")
raise SystemExit, 1