AB.world.newRun = function()
{
// Code to execute once at the start.
// Should call:
// ABWorld.init ( COLOR );
};
AB.world.takeAction = function ( action )
{
// Take this action.
// Can also put code to execute every step in here.
// Can put P5 instructions to be executed every step here, or in draw()
};
AB.world.endRun = function()
{
};
AB.world.getState = function()
{
return ( 0 );
};
AB.world.getScore = function()
{
return ( 0 );
};
//---- setup -------------------------------------------------------
// Do NOT make a setup function.
// This is done for you in the API. The API setup just creates a canvas.
// Anything else you want to run at the start should go into the following two functions.
function beforesetup() // Optional
{
// Anything you want to run at the start BEFORE the canvas is created
}
function aftersetup() // Optional
{
// Anything you want to run at the start AFTER the canvas is created
}
//---- draw -------------------------------------------------------
function draw() // Optional
{
// Can put P5 instructions to be executed every step here, or in AB.world.nextStep()
}