seperate teststrat from main code

This commit is contained in:
Thefeli73 2020-09-27 16:54:14 +02:00
parent 71bf5567aa
commit 661d542e79

12
main.py
View File

@ -23,7 +23,19 @@ def take_turn():
# TODO Implement your artificial intelligence here.
# TODO Take one action per turn until the game ends.
# TODO The following is a short example of how to use the StarterKit
if not useTestStrategy:
state = game_layer.game_state
# messages and errors for console log
for message in game_layer.game_state.messages:
print(message)
for error in game_layer.game_state.errors:
print("Error: " + error)
# pre-made test strategy
# which came with
# starter kit
if useTestStrategy:
state = game_layer.game_state
if len(state.residences) < 1:
for i in range(len(state.map)):