I have an actor called "Red_Robot"
and I want it to not be able to pass an actor called "Horizontal_Barrier" which has no code yet.
How can I make this happen. Preferably without using the stuff from the wombat tutorial scenario.
public class Red_Robot extends Robot { public void act() { wasdDrive(); } public void wasdDrive() { if (Greenfoot.isKeyDown("a")) turn(-3); if (Greenfoot.isKeyDown("d")) turn(3); if (Greenfoot.isKeyDown("w")) move(3); if (Greenfoot.isKeyDown("s")) move(-3); } }