浏览代码

Fox problem with counting department points

JoostSijm 6 年之前
父节点
当前提交
3cdeb450e3
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      department.py

+ 2 - 2
department.py

@@ -8,6 +8,7 @@ import re
 
 
 PLAYERS = {}
 PLAYERS = {}
 
 
+
 def calculate_buildings():
 def calculate_buildings():
     """Count working in departments"""
     """Count working in departments"""
     with open('department.txt', 'r') as file:
     with open('department.txt', 'r') as file:
@@ -22,11 +23,10 @@ def calculate_buildings():
                 if player in PLAYERS:
                 if player in PLAYERS:
                     PLAYERS[player] += int(count)
                     PLAYERS[player] += int(count)
                 else:
                 else:
-                    PLAYERS[player] = 1
+                    PLAYERS[player] = 0
             except Exception as exception:
             except Exception as exception:
                 print('%s %s' % (line, exception))
                 print('%s %s' % (line, exception))
 
 
-
     for player in sorted(PLAYERS, key=PLAYERS.get, reverse=True):
     for player in sorted(PLAYERS, key=PLAYERS.get, reverse=True):
         print('%3s %s' % (PLAYERS[player], player))
         print('%3s %s' % (PLAYERS[player], player))