Эх сурвалжийг харах

Merge branch 'master' of git.craftbroec.nl:cb/rr_functions

JoostSijm 6 жил өмнө
parent
commit
0072301521
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      department.py

+ 2 - 2
department.py

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