Curses is not currently a problem.
[super-star-trek.git] / sst.py
diff --git a/sst.py b/sst.py
index a9aa1a4b53e005fb82d0c95dd3bd8cd8fd7bd0f8..0bb0a5b430f77751d2d1aed41507fa3aa47ef9a3 100755 (executable)
--- a/sst.py
+++ b/sst.py
@@ -319,7 +319,9 @@ class Enemy:
         else:
             self.location = Coord()
             self.kdist = self.kavgd = None
-            game.enemies.remove(self)
+            # Guard prevents failure on Tholian or thingy
+            if self in game.enemies:
+                game.enemies.remove(self)
         return motion
     def __repr__(self):
         return "<%s,%s.%f>" % (self.type, self.location, self.power)        # For debugging
@@ -2606,7 +2608,7 @@ def wait():
         if key  != "IHEOL":
             break
         proutn(_("How long? "))
-    scanner.chew()
+        scanner.chew()
     if key != "IHREAL":
         huh()
         return
@@ -3431,8 +3433,8 @@ def proutn(proutntline):
             pause_game()
             clrscr()
         # Uncomment this to debug curses problems
-        if logfp:
-            logfp.write("#curses: at %s proutn(%s)\n" % ((y, x), repr(proutntline)))
+        #if logfp:
+        #    logfp.write("#curses: at %s proutn(%s)\n" % ((y, x), repr(proutntline)))
         curwnd.addstr(proutntline)
         curwnd.refresh()
     else:
@@ -6161,6 +6163,7 @@ commands = [
     ("QUIT",             0),
     ("HELP",             0),
     ("SCORE",            0),
+    ("CURSES",            0),
     ("",                 0),
 ]
 
@@ -6381,6 +6384,9 @@ def makemoves():
             helpme()                        # get help
         elif cmd == "SCORE":
             score()                         # see current score
+        elif cmd == "CURSES":
+            game.options |= (OPTION_CURSES | OPTION_COLOR)
+            iostart()
         while True:
             if game.alldone:
                 break                # Game has ended