The Editor

The Editor

> Tutorial

The editor, accessible via the "Editor" tab in the menu, is where you develop your AI.

What is an AI?

An artificial intelligence (AI) is code written in LeekScript that controls your leek during its turn. The code you write is run at the start of each of your leek's turns and decides the actions it takes: attacking, moving, using a weapon or a chip…

Here is a very simple example of an AI:

Once a fight has started, you can no longer step in to control your leek's actions: only the AI counts, which is why it is essential to program it carefully.

LeekScript is inspired by JavaScript, PHP and Java.

The editor interface

The editor lets you create and edit your AIs. Once your code is written, save it with the File > Save button or the Ctrl + S shortcut. When you save, any errors detected by the editor are shown in red.

The editor also has many keyboard shortcuts that can save you time while developing your AIs. Here are the most useful ones to get started:

❓ Quiz

What can you do with the editor?

Develop an AI Test an AI Publish an AI View an AI