【codecombat 中国】攻略--边远地区的深林--羊肠小道

目标:你的英雄必须活下来

   到小路尽头去

  奖励:获取两个宝石

    完全获取六个宝石

 

 

你会发现右上角的四颗宝石有怪兽在守护,次关卡只拿到两颗宝石也可以通过,提供两种参考方案使英雄成功拿到宝石并保全性命,(1)把兽人引出去,将自己关在小路里,虽然自己出不来了但是可以安全拿到宝石;(2)如图中我选择的路线参考代码(javascript):

// 到小路的尽头去,并在那儿修一个栅栏。
// 利用你的 moveXY(x, y)坐标移动功能。

// It's the first point of the path.
hero.moveXY(36, 59);
// Move at the next points of the path.
hero.moveXY(37, 13);
hero.moveXY(72, 59);
hero.moveXY(74, 59);
hero.moveXY(74, 62);
hero.moveXY(72, 63);
hero.moveXY(68, 21);
hero.buildXY("fence", 72, 25);

 

大家可多多尝试,通关的方法很多。

posted @ 2017-04-01 16:33  王大脸盘子  阅读(377)  评论(0)    收藏  举报