Guest User

creature class

a guest
Jun 19th, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1.  
  2.   abstract class  Creature {
  3.   //public int position;
  4.   int r, c;
  5.    
  6.    abstract void moveTo (Location l);
  7.    
  8.     int xPixel () {
  9.      
  10.       return c * 16  + 8;
  11.     }
  12.      int yPixel () {
  13.       return r * 16 + 8;
  14.     }
  15.  
  16.  
  17.     abstract void putSelfInGrid();
  18.    
  19.     abstract Location getLocation();
  20.    
  21.     abstract void removeSelfFromGrid();
  22.    
  23.     abstract void beEaten();  
  24.    
  25.  
  26.   }
Advertisement
Add Comment
Please, Sign In to add comment