// Cloned by Isa Masri on 20 Sep 2022 from Mind "Expo Mind" by test
// Please leave this clone trail here.
// Mind has to make decision based on partial state x
// x tells us agent position and enemy position
// does not tell us of existence of walls
// if return invalid move (not empty square) World just ignores it and we miss a turn
AB.mind.getAction = function()
{
// move object towards target
if ( AB.randomBoolean() ) // randomly choose to track target x or y each step
{
if ( x < tx ) return ACTION_RIGHT;
else return ACTION_LEFT;
}
else
{
if ( y < ty ) return ACTION_DOWN;
else return ACTION_UP;
}
};