seperate teststrat from main code
This commit is contained in:
parent
71bf5567aa
commit
661d542e79
12
main.py
12
main.py
@ -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)):
|
||||
|
Reference in New Issue
Block a user