public void setState(String state){
        if (state == "flagged" || state == "dug" || state == "untouched"){
            this.state = state;
        }else {
            throw new IllegalArgumentException("Illegal state being passed in");
        }
    }