if game.options & OPTION_CURSES:
curwnd.attron(curses.A_REVERSE)
-def commandhook(cmd, before):
- pass
-
#
# Things past this point have policy implications.
#
else:
proutn(" ")
if game.state.galaxy[i][j].supernova:
- strcpy(buf, "***")
+ show = "***"
elif not game.state.galaxy[i][j].charted and game.state.galaxy[i][j].starbase:
- strcpy(buf, ".1.")
+ show = ".1."
elif game.state.galaxy[i][j].charted:
- sprintf(buf, "%3d" % (game.state.chart[i][j].klingons*100 + game.state.chart[i][j].starbase * 10 + game.state.chart[i][j].stars))
+ show = "%3d" % (game.state.chart[i][j].klingons*100 + game.state.chart[i][j].starbase * 10 + game.state.chart[i][j].stars)
else:
- strcpy(buf, "...")
- proutn(buf)
+ show = "..."
+ proutn(show)
if (game.options & OPTION_SHOWME) and i == game.quadrant.x and j == game.quadrant.y:
proutn(">")
else:
if not game.state.galaxy[w.x][w.y].supernova and \
game.state.galaxy[w.x][w.y].klingons + klump <= MAXKLQUAD:
break
- game.state.galaxy[w.x][w.y].klingons += klump
+ game.state.galaxy[w.x][w.y].klingons += int(klump)
if krem <= 0:
break
# Position Klingon Commander Ships
k = 0
proutn(_("LEGAL COMMANDS ARE:"))
for key in commands:
- if ACCEPT(cmd):
+ if ACCEPT(key):
if k % 5 == 0:
skip(1)
proutn("%-12s " % key)
setwnd(message_window)
clrscr()
cmd = citem.upper()
- if cmd not in commands:
+ if cmd in commands:
+ break
+ else:
listCommands()
continue
- commandhook(commands[i].name, True)
if cmd == "SRSCAN": # srscan
srscan()
elif cmd == "STATUS": # status
# elif cmd == "VISUAL":
# visual() # perform visual scan
#endif
- commandhook(commands[i].name, False)
while True:
if game.alldone:
break # Game has ended
setwnd(fullscreen_window)
clrscr()
prelim()
- setup(needprompt=not line)
+ setup(needprompt=not inqueue)
if game.alldone:
score()
game.alldone = False