极客战记-背靠背

 时间:2026-02-12 12:55:50

1、选择英雄和编程语言

极客战记-背靠背

2、选择装备

极客战记-背靠背

3、写中文注释

极客战记-背靠背

1、写代码

#循环

while True:

    #找敌人

    enemy = hero.findNearestEnemy()

    #如果有敌人

    if enemy:

        #攻击

        hero.attack(enemy)

    #否则

    else:

        #到中间

        hero.moveXY(40, 36)

极客战记-背靠背

2、运行

极客战记-背靠背

1、写代码

//循环

while(true) {

    //找敌人

    var enemy = hero.findNearestEnemy();

    //如果有敌人

    if (enemy){

        //攻击

        hero.attack(enemy);

    }

    //否则

    else{

        //到中间

        hero.moveXY(40, 36);

        }

}

极客战记-背靠背

2、运行

极客战记-背靠背

1、写代码

#循环

while true        

    #找敌人

    enemy = hero.findNearestEnemy()

    #如果有敌人

    if enemy    

        #攻击

        hero.attack(enemy)

    #否则

    else

        #到中间

        hero.moveXY(40, 36)

极客战记-背靠背

2、运行

极客战记-背靠背

1、写代码

--循环

while true do

    --找敌人

    local enemy = hero:findNearestEnemy()

    --如果有敌人

    if enemy then        

        --攻击

        hero:attack(enemy)

    --否则

    else

        --到中间

        hero:moveXY(40, 36)

    end

end

极客战记-背靠背

2、运行

极客战记-背靠背

  • 极客战记-逻辑之路
  • 极客战记-滑走
  • 极客战记-高山拉力
  • 极客战记-冰冻打击
  • 极客战记-边地僵局
  • 热门搜索
    三年级教师节手抄报 有关食品安全的手抄报 关于文明出行的手抄报 运动手抄报 愚人节手抄报 保护视力手抄报 关于菊花的手抄报 七彩童年手抄报图片 迎接期中考试手抄报 防地震手抄报内容