

public class HitResponse {
    private HitResponseType type;
    private Point point;

    public HitResponse(HitResponseType type, Point point) {
        this.type = type;
        this.point = point;
    }

    public HitResponse (int typeIndex, Point point) {
        if (typeIndex >= 0 && typeIndex < HitResponseType.values().length) {
            this.type = HitResponseType.values()[typeIndex];
            this.point = point;
        } else {
            throw new IllegalArgumentException();
        }
    }
    
    public HitResponseType getHitResponse() {
    	return this.type;
    }

    public Point getPoint() {
    	return this.point;
    }

    public void setType(HitResponseType type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return this.getPoint().toString() + " " + this.type.ordinal();
    }

    public HitResponseType getType() {
        return type;
    }
}
