it sase that moves argument pos should have type object but got type null hears my code
while True:
enemies = hero.findEnemies()
nearestEnemy = hero.findNearest(enemies)
# Your hero can collect coins and summon troops.
if hero.gold > hero.costOf("griffin-rider"):
hero.summon("griffin-rider")
if hero.gold > hero.costOf("paladin"):
hero.summon("paladin")
# She also commands your allies in battle.
friends = hero.findFriends()
for friend in friends:
hero.command(friend, "attack", friend.findNearest(enemies))
# Use your hero's abilities to turn the tide.
coin = hero.findNearest(hero.findItems())
hero.move(coin.Pos)