Advertisement
Guest User

Untitled

a guest
May 19th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1. import greenfoot.*;  // (Actor, World, Greenfoot, GreenfootImage)
  2.  
  3. public class CrabWorld extends World
  4. {
  5.     /**
  6.      * Create the crab world (the beach). Our world has a size
  7.      * of 560x560 cells, where every cell is just 1 pixel.
  8.      */
  9.     public CrabWorld()
  10.     {
  11.         super(560, 560, 1);
  12.     int x = Greenfoot.getRandomNumber(500);
  13.     int y = Greenfoot.getRandomNumber(500);
  14.     }
  15. {
  16. Crab crab1 = new Crab();
  17. addObject = (crab1, x, y)
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement