Pārlūkot izejas kodu

fix Abbey-related tile counting bug

George C. Privon 7 gadi atpakaļ
vecāks
revīzija
bc7a0f3287
2 mainītis faili ar 7 papildinājumiem un 1 dzēšanām
  1. 4 0
      CHANGELOG.md
  2. 3 1
      cgame.py

+ 4 - 0
CHANGELOG.md

@@ -11,6 +11,10 @@
 * Announce gameID and location at the start.
 * Status printout now shows time elapsed since end of previous turn.
 
+#### Bug fixes
+
+* Fixed tile counting bug when an Abbey is played.
+
 ### 0.4.1 (18 November 2018)
 
 #### Enhancements

+ 3 - 1
cgame.py

@@ -376,6 +376,8 @@ class cgame:
         command = command + cmdtime + '"'
         if builder:
             bID = 1
+        elif abbey:
+            bID = 2
         else:
             bID = 0
 
@@ -528,7 +530,7 @@ class cgame:
         Return the current player, determined by the turn number
         """
 
-        return self.players[int((self.ntile - self.nbuilder - 1) % len(self.players))]
+        return self.players[int((self.ntile + self.nabbey - self.nbuilder - 1) % len(self.players))]
 
 
     def checkPlayers(self, trial):