I'm playing around with some code, trying to learn (I'm new to Java), and I'm wondering if there is any way to code in a dead zone for actors that prevents them from entering?
if (!getObjectsInRange( /** some range */, Spot.class).isEmpty())
{
move( - /** some number */ );
/** turn command */
}if ((!getObjectsInRange(1, InvisibleBarrier.class)).isEmpty())
{
turn(180);
move(1);
}if (!(((getObjectsInRange(1, InvisibleBarrier.class)).isEmpty())))
{
turn(180);
move(1);
}