LeekScript Cheat Sheet

LeekScript Cheat Sheet

> LeekScript

> This page sums up how to use LeekScript and is aimed at experienced players. If you are a beginner, see the Tutorial.

LeekScript is an imperative, functional, object-oriented and weakly typed language inspired by JavaScript, PHP and Java. In Leek Wars, it runs on the server to generate the fights. Every instruction uses up operations, and the limit is set to 1 million operations per leek core (getMaxOperations), per fight turn.

Variables
Conditions and loops
Lists

Main functions: count, push, pop, insert, inArray, arrayMap, sort, etc.

Maps

Main functions: mapSize, mapContainsKey, mapContains, mapRemove, mapKeys, mapValues, etc.

Functions
Classes

More on this in Objects and Classes.

Debugging your code
Using several files