Go "Huh?" on a command that doesn't match the current game options.
authorEric S. Raymond <esr@thyrsus.com>
Fri, 24 Feb 2012 22:39:46 +0000 (17:39 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 24 Feb 2012 22:39:56 +0000 (17:39 -0500)
Solves the problem with 'status' making the curses version crap out.
All regression tests pass.

sst.py

diff --git a/sst.py b/sst.py
index b1ab2f3487b232413ff89f1c7dfd2653090881c6..b34801ab34dbb71a21e2ee7fa43ad6c48336ffeb 100755 (executable)
--- a/sst.py
+++ b/sst.py
@@ -6007,6 +6007,8 @@ def makemoves():
             if cmd == "":
                 listCommands()
                 continue
+            elif opt and not (opt & game.options):
+                huh()
             else:
                 break
         if cmd == "SRSCAN":                # srscan