from java.lang import Runnable import random from truck import Coordinates class YourAgent(Runnable): def run(self): while self.game.isRunning(): try: result = self.actor.scan() if result: self.actor.log(result.toString()) self.actor.move(Coordinates( random.random() * self.game.getBattlefield().getSize()[0], random.random() * self.game.getBattlefield().getSize()[1], )) except Exception, exc: self.actor.log(exc)