@@ -0,0 +1,1716 @@
+import javax.swing.*;%0Aimport java.awt.*;%0Aimport java.awt.event.*;%0Aimport java.awt.image.*;%0Aimport java.lang.*;%0A   %0Apublic class Obstacle extends Object%0A%7B%0A   ImageIcon obstacle;%0A   private int xPos;%0A   private int yPos;%0A   final private int length=40;%0A   final private int width=40;%0A   private boolean isCollidable;%0A   private boolean isOnScreen;%0A%0A   public Obstacle(int x, int y)%0A   %7B%0A      xPos=x;%0A      yPos=y;%0A      obstacle = new ImageIcon(%22rsz_brick.png%22);%0A   %7D%0A      %0A   public int getX()%0A   %7B%0A      return xPos;%0A   %7D%0A   %0A   public int getY()%0A   %7B%0A      return yPos;%0A   %7D%0A   %0A   public int getWidth()%0A   %7B%0A      return obstacle.getIconWidth();%0A   %7D%0A   %0A   public int getHeight()%0A   %7B%0A      return obstacle.getIconHeight();%0A   %7D%0A%0A   public void setXPos(int x)%0A   %7B%0A      xPos=x;    %0A   %7D%0A        %0A   public void setYPos(int y)%0A   %7B%0A      yPos=y;%0A   %7D%0A%0A   public void draw(Graphics g)%0A   %7B%0A      g.drawImage(obstacle.getImage(), getX(), getY(), obstacle.getIconWidth(), obstacle.getIconHeight(),  null);%0A   %7D%0A%0A%0A   // returns true if any part of the polkadot is inside the bumper%0A   public boolean inObstacle(Player player)%0A      %7B%0A         for(int x = getX(); x %3C= getX() + getWidth(); x++)   //starts at upper left corner(x,y)%0A            for(int y = getY(); y %3C= getY() + getWidth(); y++)%0A               if(distance(x, y, player.getX(), player.getY()) %3C= player.getRadius() ) //checks every point on the bumper%0A                  return true;            %0A         return false;%0A      %7D  %0A  %0A    %0A    // returns distance between (x1, y1) and (x2, y2)%0A   private double distance(double x1, double y1, double x2, double y2)%0A   %7B%0A      return Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2));%0A   %7D%09%0A   %0A   %0A%7D%0A

Create Obstacle.java