class Treasure extends Twofer{
  PImage img;
  boolean grabbed = false;
   Treasure(int x,int y){
       super(x,y);
       img = loadImage("treasure/t-"+round(random(1,9))+".png");
   } 
     void draw(){
      image(img, (x * SQUARESIZE)-3,(y * SQUARESIZE));
      
   }
   
   boolean isIn(int px, int py){
      if(px == x && py == y){
         return true;
      } 
      return false;
   }

}