zoukankan      html  css  js  c++  java
  • codecombat js

    #1

    // Move to the gem.
    // Don't touch the walls!
    // Type your code below.
    
    this.moveRight();
    this.moveDown();
    this.moveRight();

    #2

    // Grab all the gems using your movement commands.
    
    this.moveRight();
    this.moveDown();
    this.moveUp();
    this.moveUp();
    this.moveRight();

    #3

    // 避开食人魔的视线,夺取宝石。
    this.moveRight();
    this.moveUp();
    this.moveRight();
    this.moveDown();
    this.moveRight();

    #4

    // 夺取宝石,然后到楼梯那里去。
    this.moveRight();
    this.moveUp();
    this.moveRight();
    this.moveRight();
    this.moveDown();
    this.moveDown();
    this.moveUp();
    this.moveRight();

    #5

    // 抵抗Brak and Treg!
    // 你必须攻击小食人魔两次。
    this.moveRight();
    this.attack("Brak");
    this.attack("Brak");
    this.moveRight();
    this.moveRight();
    this.attack("Treg");
    this.attack("Treg");
    this.moveRight();

    #6

    // 打败食人魔
    // 记住,每只攻击两次。
    
    var kiss=this.findNearestEnemy();
    this.attack(kiss);
    this.attack(kiss);
    kiss=this.findNearestEnemy();
    this.attack(kiss);
    this.attack(kiss);
    kiss=this.findNearestEnemy();
    this.attack(kiss);
    this.attack(kiss);

    #7

    loop{
        this.moveRight();
        this.moveRight();
        this.moveUp();
        this.moveUP();
    }

    #8

    // 使用loop循环穿越迷宫!
    loop{
        this.moveRight();
        this.moveUp();
        this.moveRight();
        this.moveDown();
    }

    #9

    // 攻击大门(Door)
    // 需要攻击很多次,请使用loop循环
    
    loop {
        var kiss=this.findNearestEnemy();
        this.attack(kiss);   
    }

    #10

    // 你可以用名称标签作为变量。
    
    loop{
        var kiss=this.findNearestEnemy();
        this.attack(kiss);
    }

    #11

    // 你的英雄不知道这些敌人的名字!
    // 这眼镜给了你寻找最近敌人的能力。
    
    // 你可以用名称标签作为变量。
    
    loop{
        var kiss=this.findNearestEnemy();
        this.attack(kiss);
    }

    #12

    // 创建第二个变量并攻击它.
    
    var enemy1 = this.findNearestEnemy();
    this.attack(enemy1);
    this.attack(enemy1);
    var enemy2 = this.findNearestEnemy();
    this.attack(enemy2);
    this.attack(enemy2);
    this.moveRight();
    this.moveDown();
    this.moveRight();

    #13

    this.moveRight();
    
    // 通过上一个关卡,你应该能认识这个。
    var enemy1 = this.findNearestEnemy();
    // 现在,攻击那个变量,
    this.attack(enemy1);
    this.attack(enemy1);
    this.moveRight();
    this.moveRight();
    enemy1=this.findNearestEnemy();
    this.attack(enemy1);
    this.attack(enemy1);
    this.moveRight();

    #14

    loop{ 
        this.moveRight();
        this.moveUp();
        var a=this.findNearestEnemy();
        this.attack(a);
        this.attack(a);
        this.moveRight();
        this.moveDown();
        this.moveDown();
        this.moveUp()
    }

    #15

    // 建造三个栅栏来隔离兽人!
    
    this.moveDown();
    this.buildXY("fence", 36, 34);
    this.buildXY("fence", 36, 30);
    this.buildXY("fence", 36, 27);
    loop{
    this.moveRight();
    }

    #16

    // 建立两个围栏保护村民
    // Hover your mouse over the world to get X,Y coordinates.
    this.buildXY("fence", 40, 52);
    this.buildXY("fence", 40, 20);

    #17

    // 到小路的尽头去,并在那儿修一个栅栏。
    // 利用你的 moveXY(x, y)坐标移动功能。
    
    this.moveXY(34, 45);
    this.moveXY(36, 61);
    this.moveXY(37, 13);
    this.buildXY("fence", 71,25);

    后面关卡图片挂了,太TM无聊了,这个网站,居然还收费……

  • 相关阅读:
    HDU 2013(递归)
    紫书搜索 习题7-6 UVA
    紫书搜索 习题7-4 UVA
    紫书搜索 习题7-3 UVA
    紫书搜索 习题7-2 UVA
    紫书搜索 习题7-1 UVA
    紫书搜索 例题7-10 UVA
    紫书搜索 例题7-13 UVA
    紫书搜索 例题7-12 UVA
    紫书搜索 例题7-9 UVA
  • 原文地址:https://www.cnblogs.com/qscqesze/p/4282570.html
Copyright © 2011-2022 走看看