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

Team Work #151

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

# Gems will disappear soon. You'll need help!

# findItems() returns an array of items.
items = hero.findItems()

# Get the first gem from the array.
# Don't forget that the first index is 0.
gem0 = items[0]

# Tell Bruno to get gem0
hero.say("Bruno " + gem0)

# You can reference the gem without a variable.
hero.say("Matilda " + items[1])

# Create a variable for the last gem, items[2]:
hero.say("&"+items[2])
# Move to that gem's position using moveXY()
hero.moveXY(items[2].pos.x,items[1].pos.y)