public void lock(String mode) {
        if (this.state == CellState.MARKED) {
            this.state = CellState.LOCKED;
            if (!hasMine()) notifyObservers("errorMarked");
        }
        if (this.state != CellState.CLOSED) return;
        this.state = CellState.LOCKED;
        if (hasMine() && mode.equalsIgnoreCase("E")) notifyObservers("Locked");
    }