瀏覽代碼

reorder scoring questions to match natural order people report them

George C. Privon 7 年之前
父節點
當前提交
0e112d45fd
共有 2 個文件被更改,包括 26 次插入25 次删除
  1. 1 0
      CHANGELOG.md
  2. 25 25
      cgame.py

+ 1 - 0
CHANGELOG.md

@@ -9,6 +9,7 @@
 * Add `analysis/README.md` file to briefly explain what the analysis scripts do.
 * Add some additional explanatory text to the main `README.md` file.
 * Add Expansion 3 (The Princes and the Dragon) to SQL database creation.
+* Reorder score recording questions to better match how players seem to naturally report scores.
 
 #### Bug fixes
 

+ 25 - 25
cgame.py

@@ -270,31 +270,6 @@ class cgame:
             if len(score['playerIDs']) > 1:
                 score['sharedscore'] = 1
 
-        # get points for score
-        VALID = False
-        while not VALID:
-            points = input("Enter the total number of points: ")
-            try:
-                score['points'] = int(points)
-                VALID = True
-            except:
-                _sys.stderr.write("'" + points + "' is not a valid score.\n")
-                continue
-
-        # get the score type
-        VALID = False
-        while not VALID:
-            for i, stype in enumerate(self.scoretypes):
-                _sys.stdout.write("{0:d}) ".format(i+1) + stype + "\n")
-            # here i want a list of valid score types
-            stype = input("Please select the score type: ")
-            try:
-                score['scoretype'] = self.scoretypes[int(stype)-1]
-                VALID = True
-            except:
-                _sys.stderr.write("'" + stype + "' is not a valid score type.\n")
-                continue
-
         # see which token scored
         # really this should be expanded to allow multiple token types for one score
         if score['scoretype'] == 'Trade token':
@@ -314,6 +289,31 @@ class cgame:
         else:
             score['tokens'] = self.tokens[0]
 
+        # get the score type
+        VALID = False
+        while not VALID:
+            for i, stype in enumerate(self.scoretypes):
+                _sys.stdout.write("{0:d}) ".format(i+1) + stype + "\n")
+            # here i want a list of valid score types
+            stype = input("Please select the score type: ")
+            try:
+                score['scoretype'] = self.scoretypes[int(stype)-1]
+                VALID = True
+            except:
+                _sys.stderr.write("'" + stype + "' is not a valid score type.\n")
+                continue
+
+        # get points for score
+        VALID = False
+        while not VALID:
+            points = input("Enter the total number of points: ")
+            try:
+                score['points'] = int(points)
+                VALID = True
+            except:
+                _sys.stderr.write("'" + points + "' is not a valid score.\n")
+                continue
+
         score['comments'] = input("Enter any comments you would like saved (a single line): ")
 
         # check score input to make sure it's correct