AlexeySapsay / Python_solution_CodeCombat_2018

In that repository I will post my sollution for codecombat.com games for study Python
1 stars 0 forks source link

Crag Tag #189

Open AlexeySapsay opened 6 years ago

AlexeySapsay commented 6 years ago
# Follow me on youtube  channel Phy Tu
# Help with programming on Python, school math, physics
# https://www.youtube.com/channel/UCP5ycahCEZ24qmRRgNnko5Q

# Catch up to Pender Spellbane to learn her secrets.

while True:
    # Pender is the only friend here, so she's always the nearest.
    pender = hero.findNearest(hero.findFriends())

    if pender:
        # moveXY() will move to where Pender is,
        # but she'll have moved away by the time you get there.
        #hero.moveXY(pender.pos.x, pender.pos.y)
        hero.move(pender.pos)
        # move() only moves one step at a time,
        # so you can use it to track your target.
        #hero.move(pender.pos)