I need a simple collision code I have Tank and wall2 as actors I have no code yet as I have no idea how to do it please help
int dr = 0; // direction of rotation
if (Greenfoot.isKeyDown("left")) dr--;
if (Greenfoot.isKeyDown("right")) dr++;
if (dr != 0)
{
turn(3*dr);
// check for intersecting obstacles and 'turn(-3*dr)', taking the turn back, if any are found
}