From: Stas Sergeev Date: Wed, 15 Dec 2010 15:21:11 +0000 (+0300) Subject: do not abbreviate commands after abandon X-Git-Tag: 2.2~115^2~1 X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=commitdiff_plain;h=727a37b8e37e7a7463540b62031965acfd53194f do not abbreviate commands after abandon --- diff --git a/sst.py b/sst.py index 3a777e1..857f2b0 100755 --- a/sst.py +++ b/sst.py @@ -5898,8 +5898,13 @@ def makemoves(): clrscr() setwnd(message_window) clrscr() + abandon_passed = False for (cmd, opt) in commands: - if cmd.startswith(scanner.token.upper()): + # commands after ABANDON cannot be abbreviated + if cmd == "ABANDON": + abandon_passed = True + if cmd == scanner.token.upper() or (not abandon_passed \ + and cmd.startswith(scanner.token.upper())): break; if cmd == "": listCommands()