Minor bug fixes, preparatory to finding out why replay doesn't work.
authorEric S. Raymond <esr@thyrsus.com>
Fri, 6 Oct 2006 02:16:43 +0000 (02:16 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 6 Oct 2006 02:16:43 +0000 (02:16 +0000)
src/sst.py

index 9785eb7bf215d6a78450cddc52a3cc0713c79bbe..89e2cce46225144fb9b906a2e6789325d831737a 100644 (file)
@@ -3620,8 +3620,11 @@ def cgetline():
     else:
        if replayfp and not replayfp.closed:
            line = replayfp.readline()
+            if line == '':
+                prout("*** Replay finished")
+                replayfp.close()
        else:
-           line = raw_input()
+           line = raw_input("COMMAND> ")
     if logfp:
        logfp.write(line + "\n")
     return line
@@ -6505,7 +6508,6 @@ def makemoves():
            chew()
            setwnd(prompt_window)
            clrscr()
-           proutn("COMMAND> ")
            if scan() == IHEOL:
                if game.options & OPTION_CURSES:
                    makechart()
@@ -6624,10 +6626,6 @@ def makemoves():
            game.alldone = True         # quit the game
        elif cmd == "HELP":
            helpme()                    # get help
-       elif cmd == "SEED":             # set random-number seed
-           key = scan()
-           if key == IHREAL:
-               seed = int(round(aaitem))
 #ifdef BSD_BUG_FOR_BUG
 #      elif cmd == "VISUAL":
 #          visual()                    # perform visual scan