Class Bar

java.lang.Object
  extended by Bar

public class Bar
extends java.lang.Object


Constructor Summary
Bar(int y)
          Constructor below takes in the y location of where the bar should be The x should be random The size should be random The direction (left or right should be random
 
Method Summary
 void draw(java.awt.Graphics g)
          This will draw the bar on g
 boolean isCollision(int squareX, int squareY)
          Hard method use your example of collissions from before
 void move()
          Have the bar move left or right depending on direction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bar

public Bar(int y)
Constructor below takes in the y location of where the bar should be The x should be random The size should be random The direction (left or right should be random

Method Detail

draw

public void draw(java.awt.Graphics g)
This will draw the bar on g


isCollision

public boolean isCollision(int squareX,
                           int squareY)
Hard method use your example of collissions from before


move

public void move()
Have the bar move left or right depending on direction