Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (Greenfoot.isKeyDown("right"))
- {
- move(1);
- }
- if (Greenfoot.isKeyDown("left"))
- {
- move(-1);
- }
- if (Greenfoot.isKeyDown("up"))
- {
- turn(90);
- move(-1);
- turn(-90);
- }
- if (Greenfoot.isKeyDown("down"))
- {
- turn(-90);
- move(-1);
- turn(90);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement