@@ -0,0 +1,1645 @@
+import java.awt.Image;%0Aimport java.awt.Rectangle;%0Aimport javax.swing.ImageIcon;%0Aimport java.util.Random;%0A%0Apublic class Loot%7B%0A%09public int xcoord;%0A%09public int ycoord;%0A%09Image Loot;%0A%09public Random generator = new Random();%0A%09public boolean visible = false;%0A%0A%09public Loot() %7B%0A%09%09ImageIcon i = new ImageIcon(this.getClass().getResource(%22Loot.png%22));%0A%09%09Loot = i.getImage();%0A%09%09xcoord = 500;%0A%09%09ycoord = 500;%0A%09%7D%0A%0A%09public int getX() %7B%0A%09%09return xcoord;%0A%09%7D%0A%0A%09public int getY() %7B%0A%09%09return ycoord;%0A%09%7D%0A%0A%09public Image getImage() %7B%0A%09%09return Loot;%0A%09%7D%0A%0A%09public boolean checkCollisions(Rectangle knightRect, boolean k) %7B%0A%09%09Rectangle lootRect = new Rectangle(this.getX(), this.getY(),%0A%09%09%09%0948 - 12, 48);%0A%09%09if ((lootRect.intersects(knightRect)) && (k == false)) %7B%0A%09%09%09int ytemp1 = -1 * (generator.nextInt(100) + 100);%0A%09%09%09int xtemp1 = -1 * (generator.nextInt(100) + 100);%0A%09%09%09int ytemp2 = (generator.nextInt(412) + 300);%0A%09%09%09int xtemp2 = (generator.nextInt(412) + 300);%0A%09%09%09int option = generator.nextInt(4) + 1;%0A%09%09%09switch (option) %7B%0A%09%09%09case 1:%0A%09%09%09%09this.xcoord = xtemp1;%0A%09%09%09%09this.ycoord = ytemp1;%0A%09%09%09%09break;%0A%09%09%09case 2:%0A%09%09%09%09this.xcoord = xtemp1;%0A%09%09%09%09this.ycoord = ytemp2;%0A%09%09%09%09break;%0A%09%09%09case 3:%0A%09%09%09%09this.xcoord = xtemp2;%0A%09%09%09%09this.ycoord = ytemp1;%0A%09%09%09%09break;%0A%09%09%09case 4:%0A%09%09%09%09this.xcoord = xtemp2;%0A%09%09%09%09this.ycoord = ytemp2;%0A%09%09%09%09break;%0A%09%09%09%7D%0A%09%09%09return true;%0A%09%09%7D else %7B%0A%09%09%09return false;%0A%09%09%7D%0A%09%7D%0A%0A%09public boolean checkknightCollisions(Rectangle knightRect) %7B%0A%09%09Rectangle skeletonRect = new Rectangle(this.getX(), this.getY(), 48, 48);%0A%09%09if ((skeletonRect.intersects(knightRect))) %7B%0A%09%09%09return true;%0A%09%09%7D else %7B%0A%09%09%09return false;%0A%09%09%7D%0A%09%7D%0A%0A%09public void makeVisible() %7B%0A%09%09visible = true;%0A%09%7D%0A%7D%0A

Create Loot.java