Explorar el Código

implement turn-bumping without a score

George C. Privon hace 8 años
padre
commit
63a2e51f7c
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      cgame.py

+ 3 - 3
cgame.py

@@ -168,7 +168,7 @@ class cgame:
         return 0
         return 0
 
 
 
 
-    def recordScore(gameID, playerIDs, expansionIDs, cround, state):
+    def recordScore(self):
         """
         """
         Record a score event in the game
         Record a score event in the game
         """
         """
@@ -206,8 +206,8 @@ class cgame:
             bID = 0
             bID = 0
 
 
         # compute playerID based on the turn number minus nbuilders / number of players
         # compute playerID based on the turn number minus nbuilders / number of players
-        playerID = self.playerIDs[(self.ntile- self.nbuilder) / len(playerIDs)]
-        command = command + ', {0:d}, {1:d})'.format(bID, playerID)
+        player = self.players[int((self.ntile - self.nbuilder) % len(self.players))]
+        command = command + ', {0:d}, {1:d})'.format(bID, player[0])
 
 
         self.cur.execute(command)
         self.cur.execute(command)