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

Soldier, Ogre and Peasant #175

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

# Deliver that trinity to the left side of the river.

    # The soldier hates the ogre.
soldier = pet.findNearestByType("soldier")
# The ogre plans something bad against the peasant.
ogre = pet.findNearestByType("munchkin")
# Just a peasant. 
peasant = pet.findNearestByType("peasant")

# Use pet.carryUnit(unit, x, y) to deliver units.
pet.carryUnit(ogre,32,38)

pet.carryUnit(soldier,32,38)
pet.carryUnit(ogre,48,42)
pet.carryUnit(peasant,32,38)    
pet.carryUnit(ogre,32,38)

-----------------------------------------------------------