def petLogic(): # Add code to use your pet! # Move them to the power discs at the top of the map for powerups. pet.moveXY(60, 83) pet.say("Command me!") pet.on('spawn', petLogic) while True: # Improve your hero's default code! # Move to the nearby power discs to spawn units to help or attack! hero.moveXY(110, 46) enemy = hero.findNearestEnemy() if enemy: hero.attack(enemy) else: hero.cleave(enemy)