From 38451297a55c6e7c22c882b2c3683ca64190e01d Mon Sep 17 00:00:00 2001 From: Thefeli73 Date: Sat, 3 Oct 2020 20:06:28 +0200 Subject: [PATCH] map functions and exception fix --- main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index c1fc79a..8852750 100644 --- a/main.py +++ b/main.py @@ -23,10 +23,12 @@ def main(): game_layer.start_game() # exit game after timeout start_time = time.time() + chartMap() + optimizeAvailableTiles() while game_layer.game_state.turn < game_layer.game_state.max_turns: try: take_turn() - except: + except Exception: print(traceback.format_exc()) game_layer.end_game() exit() @@ -135,6 +137,7 @@ def chartMap(): for y in range(len(state.map) - 1): if state.map[x][y] == 0: availableTiles.append((x, y)) - +def optimizeAvailableTiles(): + pass if __name__ == "__main__": main()