关卡连接:https://codecombat.163.com/play/level/army-training
免费试玩:https://codecombat.163.com/play
集结部队。
简介
生成新的单位类型:
game.spawnXY("thrower", 10, 10) # 食人魔投矛手
game.spawnXY("soldier", 10, 10) # 人类士兵
game.spawnXY("archer", 10, 10) # 人类弓箭手
默认代码
# 生成一个英雄并添加一个目标。
game.spawnPlayerXY("champion", 40, 15)
game.addDefeatGoal()
# 生成至少2个矮人"munchkin"。
# 生成至少2个投矛手"thrower"。
# 生成至少2个士兵"soldier"。
# 生成至少2个弓箭手"archer"。
概览
Coming soon!
军事训练 解法
# 生成一个英雄并添加一个目标。
game.spawnPlayerXY("champion", 40, 15)
game.addDefeatGoal()
# 生成至少2个矮人"munchkin"。
game.spawnXY("munchkin",32,32)
game.spawnXY("munchkin",29,43)
# 生成至少2个投矛手"thrower"。
game.spawnXY("thrower",21,34)
game.spawnXY("thrower",23,46)
# 生成至少2个士兵"soldier"。
game.spawnXY("soldier",52,31)
game.spawnXY("soldier",51,41)
# 生成至少2个弓箭手"archer"。
game.spawnXY("archer",62,35)
game.spawnXY("archer",59,42)