Module: AntController

The AntController enables the user to program his/hers ants behaviour.
It has limited access to some of the ants current values.
The action for the upcoming iteration is to be written by the user.

Source:

Extends

  • Controller

Methods

getFoodStorage() → {number}

Get the current food the ant carries around.

Source:
Returns:

food.

Type
number

getGenes() → {dict}

Gets this ants genetic configuration.
Access the attributes strength, agility and sensitivity like this:
<> this.getGenes().strength.

Source:
Returns:

gene dictionary.

Type
dict

getMaxFoodStorage() → {number}

Get the maximum amount of food the ant can carry.

Source:
Returns:

maximum food.

Type
number

getMaximumRotation() → {number}

Gets the maximum rotation the ant can perform when standing still.

Source:
Returns:

maximum rotation.

Type
number

getParentID() → {number}

Get the ID of the ants hive

Source:
Returns:

parentID.

Type
number

isFull() → {bool}

Checks if the ant has food capacity left or not.

Source:
Returns:

is full.

Type
bool