//Check for stones in all 8 directions and if they can be turned add to ArrayList
for (int c = 0; c <= 315; c += 45)
{
ArrayList<Actor> actors = new ArrayList<Actor>();
Location loc = location.getNeighbourLocation(c);
Actor a = getOneActorAt(loc);
boolean hasSameImageID = false;
while (a != null && !hasSameImageID)
{
if (a.getIdVisible() != imageID)
{
actors.add(a);
loc = loc.getNeighbourLocation(c);
a = getOneActorAt(loc);
}
else
{
if (a.getIdVisible() == imageID)
hasSameImageID = true;
}
}
//Turn stones
if (hasSameImageID)
{
for (Actor actor : actors)
actor.show(imageID);
}
}