import java.awt.Color;
import java.awt.Graphics;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionListener;


public class Block extends WObject {

	
	static final double blockHeight = 4.0;
	static final double blockWidth = 20.0;
	
	
	public Block(double x, double y) {
		this.x = x;
		this.y = y;
	}
	
	@Override
	void draw(Graphics g) {
		// TODO Auto-generated method stub
		g.setColor(new Color(0.0f,1.0f,1.0f));
		g.fillRect((int) x, (int) y, (int) blockWidth, (int) blockHeight);
	}

	@Override
	void step() {
		// TODO Auto-generated method stub
   
	}

	public boolean hit(Ball ball) {
		return (x < ball.x) && (ball.x < x + blockWidth) && (y < ball.y) && (ball.y < y + blockHeight); 
	}

	
}

