import java.awt.Font;
import java.awt.Graphics;
import java.awt.FontMetrics;
import java.awt.Color;

//********************************
// Detector
//*******************************
public class Hole extends Detector
{
    long score;
    Hole(double xi,double yi,long si,boolean act)
    {
	super(xi,yi,si,act);
	width = 50;
    }
    // 
    int actOnCollision()
    {
	return 0;
    }
    boolean detect(int xh,int yh,QmGame qmGame)
    {
	boolean tst;
	if (((int)x/10) <= xh/10 && ((int) (x + width)/10 ) >= xh/10 && ((int)y/10) == yh/10)
	    tst = true;
	else 
	    tst = false;

	if (tst && active)
	    qmGame.score += val;

	if (tst && !active)
	    {
	    qmGame.ballActive = false;
	    qmGame.ballToExit = true;
	    }
	return tst;
    }
};




















