I can't seem to find how to use enemyPositions in Battle of Red Cliffs. I know I'm not supposed to get help for a competition, but I can't seem to use enemyPosition even in various different methods:
#1. Says enemyPositions is not defined
game.log("enemyPositions", enemyPositions[0][0])
#2. I also tried using it with the choiceFunction same problem
def choiceFunction(state):
p = enemyPositions[counter]
game.log("pos:", p)
type = myTeam[counter % 9][0]
return type
#3. I then tried game.enemyPositions. At first,
# it seemed to work. but when I tried it, the game would freeze and say that code ran infinitely
game.log("enemyPositions: \n", game.enemyPositions[0])
#4. Same with the choice function
def choiceFunction(state):
p = game.enemyPositions[counter]
game.log("pos:", p)
type = myTeam[counter % 9][0]
return type
Is there any way of getting the enemyPositions while not getting timed out or an error. Thanks!
- Edit: I also tried game.enemyPositions[0][0], and enemyPositions[0][0], but they also didn’t work.