Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import greenfoot.*; // (Actor, World, Greenfoot, GreenfootImage)
- public class CrabWorld extends World
- {
- /**
- * Create the crab world (the beach). Our world has a size
- * of 560x560 cells, where every cell is just 1 pixel.
- */
- public CrabWorld()
- {
- super(560, 560, 1);
- int x = Greenfoot.getRandomNumber(500);
- int y = Greenfoot.getRandomNumber(500);
- }
- {
- Crab crab1 = new Crab();
- addObject = (crab1, x, y)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement