|
@@ -0,0 +1,100 @@
|
|
|
+"""Test file for construction costs"""
|
|
|
+
|
|
|
+from rival_regions_calc import ConstructionCosts, Building
|
|
|
+
|
|
|
+ZUID_BUILDINGS = {
|
|
|
+ 'hospital': 1208,
|
|
|
+ 'military base': 815,
|
|
|
+ 'school': 775,
|
|
|
+ 'missile system': 1250,
|
|
|
+ 'sea port': 978,
|
|
|
+ 'power plant': 1400,
|
|
|
+ 'spaceport': 3,
|
|
|
+ 'airport': 1100,
|
|
|
+ 'house fund': 4050,
|
|
|
+}
|
|
|
+
|
|
|
+OOST_BUILDINGS = {
|
|
|
+ 'hospital': 1226,
|
|
|
+ 'military base': 813,
|
|
|
+ 'school': 775,
|
|
|
+ 'missile system': 4550,
|
|
|
+ 'sea port': 2475,
|
|
|
+ 'power plant': 1461,
|
|
|
+ 'spaceport': 201,
|
|
|
+ 'airport': 3750,
|
|
|
+ 'house fund': 3795,
|
|
|
+}
|
|
|
+
|
|
|
+WEST_BUILDINGS = {
|
|
|
+ # 'hospital': 2426,
|
|
|
+ # 'military base': 1640,
|
|
|
+ # 'school': 1325,
|
|
|
+ # 'missile system': 1500,
|
|
|
+ # 'sea port': 1250,
|
|
|
+ # 'power plant': 2500,
|
|
|
+ # 'spaceport': 601,
|
|
|
+ # 'airport': 1250,
|
|
|
+ # 'house fund': 7765,
|
|
|
+ # 'hospital': 1213,
|
|
|
+ # 'military base': 820,
|
|
|
+ # 'school': 663,
|
|
|
+ # 'missile system': 720,
|
|
|
+ # 'sea port': 625,
|
|
|
+ # 'power plant': 1250,
|
|
|
+ # 'spaceport': 301,
|
|
|
+ # 'airport': 625,
|
|
|
+ # 'house fund': 3883,
|
|
|
+# 'hospital': 2572,
|
|
|
+# 'military base': 1701,
|
|
|
+# 'school': 1616,
|
|
|
+# 'missile system': 1500,
|
|
|
+# 'sea port': 2000,
|
|
|
+# 'power plant': 2500,
|
|
|
+# 'spaceport': 1115,
|
|
|
+# 'airport': 2000,
|
|
|
+# 'house fund': 8371,
|
|
|
+ 'military academy': 48,
|
|
|
+ 'hospital': 2465,
|
|
|
+ 'military base': 617,
|
|
|
+ 'school': 1580,
|
|
|
+ 'missile system': 550,
|
|
|
+ 'power plant': 1450,
|
|
|
+ 'spaceport': 50,
|
|
|
+ 'airport': 500,
|
|
|
+ 'house fund': 8242,
|
|
|
+}
|
|
|
+
|
|
|
+def main():
|
|
|
+ """Main method"""
|
|
|
+ # print('oost')
|
|
|
+ # calculate(OOST_BUILDINGS)
|
|
|
+ # print('zuid')
|
|
|
+ # calculate(ZUID_BUILDINGS)
|
|
|
+ print('west')
|
|
|
+ calculate(WEST_BUILDINGS)
|
|
|
+
|
|
|
+def calculate(buildings):
|
|
|
+ """calculate and print resources"""
|
|
|
+ print('cash,gold,oil,ore,uranium,diamond')
|
|
|
+ for building_name, amount in buildings.items():
|
|
|
+ amount = int(amount/4)
|
|
|
+ building = Building(building_name)
|
|
|
+ construction_costs = ConstructionCosts(building, amount)
|
|
|
+ construction_costs.calculate(amount)
|
|
|
+ print('{},{},{},{},{},{}'.format(
|
|
|
+ construction_costs.cash,
|
|
|
+ construction_costs.gold,
|
|
|
+ construction_costs.oil,
|
|
|
+ construction_costs.ore,
|
|
|
+ construction_costs.uranium,
|
|
|
+ construction_costs.diamond,
|
|
|
+ ))
|
|
|
+
|
|
|
+
|
|
|
+def bucks(integer):
|
|
|
+ """Format number"""
|
|
|
+ return '{:,}'.format(integer).replace(',', '.')
|
|
|
+
|
|
|
+if __name__ == "__main__":
|
|
|
+ main()
|