From 36521b7bf76352ec647db953d15d7170ccff6bf2 Mon Sep 17 00:00:00 2001 From: Thefeli73 Date: Mon, 5 Oct 2020 16:43:52 +0200 Subject: [PATCH] flytta lite kod --- main.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/main.py b/main.py index 93e8bb2..cf40c9b 100644 --- a/main.py +++ b/main.py @@ -106,6 +106,17 @@ def take_turn(): for error in game_layer.game_state.errors: print("Error: " + error) +def develop_society(): + state = game_layer.game_state + if len(state.residences) < 5: + build("Apartments") + elif len(state.utilities) < 1: + build("WindTurbine") + elif state.funds > 25000 and len(game_layer.game_state.residences) < 11: + build("HighRise") + else: + game_layer.wait() + def something_needs_attention(): print("Checking for emergencies") global building_under_construction @@ -144,17 +155,6 @@ def something_needs_attention(): else: return False -def develop_society(): - state = game_layer.game_state - if len(state.residences) < 5: - build("Apartments") - elif len(state.utilities) < 1: - build("WindTurbine") - elif state.funds > 25000 and len(game_layer.game_state.residences) < 11: - build("HighRise") - else: - game_layer.wait() - def chartMap(): state = game_layer.game_state for x in range(len(state.map) - 1):