Explain the window allocations.
[super-star-trek.git] / sst.py
diff --git a/sst.py b/sst.py
index 0ef0f092018d5931580923ece5694c1580ac6915..9b30f22197e3c959431932933aa6018b650b26ce 100755 (executable)
--- a/sst.py
+++ b/sst.py
@@ -745,7 +745,7 @@ def supercommander():
         for (i, base) in enumerate(game.state.baseq):
             basetbl.append((i, (base - sc).distance()))
         if game.state.baseq > 1:
-            basetbl.sort(lambda x, y: cmp(x[1], y[1]))
+            basetbl.sort(key=lambda x: x[1])
         # look for nearest base without a commander, no Enterprise, and
         # without too many Klingons, and not already under attack. 
         ifindit = iwhichb = 0
@@ -3114,12 +3114,12 @@ rows = linecount = 0        # for paging
 stdscr = None
 replayfp = None
 fullscreen_window = None
-srscan_window     = None
-report_window     = None
-status_window     = None
-lrscan_window     = None
-message_window    = None
-prompt_window     = None
+srscan_window     = None   # Short range scan
+report_window     = None   # Report legends for status window
+status_window     = None   # The status window itself
+lrscan_window     = None   # Long range scan
+message_window    = None   # Main window for scrolling text
+prompt_window     = None   # Prompt window at bottom of display
 curwnd = None
 
 def iostart():
@@ -5734,7 +5734,7 @@ def newkling():
 
 def sortenemies():
     "Sort enemies by distance so 'nearest' is meaningful."
-    game.enemies.sort(lambda x, y: cmp(x.kdist, y.kdist))
+    game.enemies.sort(key=lambda x: x.kdist)
 
 def newqad():
     "Set up a new state of quadrant, for when we enter or re-enter it."