【codecombat】 试玩全攻略 第二章 边远地区的森林 林中的死亡回避

 

  第二章 边远地区的森林 林中的死亡回避

  这一关呢,看蓝色箭头提示,逆时针方向,使用hero.moveXY()命令,找到各个点位的坐标。

让英雄跑起来吧,躲避猎头的攻击!

  

代码如下:

 1 # There is a headhunter in the area!
 2 # Move around the forest to avoid his line-of-sight.
 3 # Use moveXY to keep moving around the forest to survive.
 4 while True:
 5     hero.moveXY(56,44)
 6     hero.moveXY(40,56)
 7     hero.moveXY(24,44)
 8     hero.moveXY(24,23)
 9     hero.moveXY(40,11)
10     hero.moveXY(56,23)
11 
12 #想了解codecombat最全最好玩的攻略内容,欢迎访问节点亲王的博客园!
13 #转载请注明出处,否则作者有权追究法律责任!

 

posted on 2016-12-20 14:54  节点亲王  阅读(1602)  评论(0编辑  收藏  举报

导航