Azymoove Help

Languages, name and versions

Five languages, the robot's name and the versions of its code.

Name and language

A robot can be written in JavaScript, TypeScript, Python, Ruby or Lua. The robot’s name is the class name, and the language comes from how the class extends Robot:

class MyRobot extends Robot {
  run() {
    while (true) { const state = this.scan(); }
  }
}

Names in each language

Each language has its own way of writing names, in the commands and in the state:

  • JavaScript and TypeScript: camelCase, with this. (this.turnRadar(1), state.me.distanceToEdge).
  • Python, Ruby and Lua: snake_case (self.turn_radar(1), state.me.distance_to_edge). In Ruby self is optional; in Lua, use self:.

Used another language’s name? The battle error tells you the right one, for example: turnRadar is not a Python command: use turn_radar.

Versions

Every time you save different code, the robot gets a new version (v1, v2…). A battle uses the version chosen when joining: the latest by default, or an earlier one. Code and build stay fixed in that battle; saving later only affects the next ones.

In My robot → History, open an earlier version in the editor. Saving a change creates a new version, without deleting the old ones.