CodeCombat-重点目标

来源:互联网 发布:js 打开新页面 编辑:程序博客网 时间:2024/03/28 23:36
// The following runs whenever the tower needs// something to do.var unit = this.getNearestCombatant();if (unit && unit.team != "humans" &&  unit.team != "allies") {    this.say('Perish, ' + unit.id + ' of the ' + unit.team);    this.attack(unit);}else {    this.say('All clear.');}// This tower is too bloodthirsty!// Have it check the unit's team before opening fire.// There are three teams: "ogres", "allies", and "humans".// If you need help, press Guide at the top.

游戏截图:


0 0