package readers;

public class Box{
    public int x;
    public int y;
    public int w;
    public int h;
    boolean ja_required;
    boolean isNumber = false;
    final static int BOX_THRESHOLD=8; //How many pixels outside the specified region the score can be.
    public Box(int x,int y,int w, int h) {
        this.x=x;
        this.y=y;
        this.w=w;
        this.h=h;
    }
    boolean insideBox(int x,int y) {
        return this.x-BOX_THRESHOLD<=x&&this.x+this.w+BOX_THRESHOLD>=x&&this.y-BOX_THRESHOLD<=y&&this.y+this.h+BOX_THRESHOLD>=y;
    }
    public void setNumber(boolean isNumber) {
        this.isNumber = isNumber;
    }
    public boolean isNumber() {
        return isNumber;
    }
}