@Override
    public void reactToChanges(ObservationEvent ev) {

        if (ev instanceof CheckBoxEvent) {
            CheckBoxEvent event = (CheckBoxEvent) ev;
            this.setThoricity(event.isChecked());
            this.notifyObserver();

        } else if (ev instanceof OptionLineEvent) {
            OptionLineEvent event = (OptionLineEvent) ev;
            String label = ((CustomOptionLine) (event.getSource())).getLabel();

            switch (label) {
                case rowsLabel:
                    this.setHeight(event.getValue());
                    break;
                case columnsLabel:
                    this.setWidth(event.getValue());
                    break;
                case minesLabel:
                    this.setMinesNumber(event.getValue());
                    break;
            }
            this.notifyObserver();

        } else if (ev instanceof NewGamePanelEvent) {

            GameDifficulty gD = ((NewGamePanel) ev.getSource()).getDifficulty();
            if (gD != GameDifficulty.CUSTOM) {
                this.setWidth(gD.getWidth());
                this.setHeight(gD.getHeight());
                this.setMinesNumber((int) Math.floor(gD.getBombPercentage() * this.width * this.height / 100));
                this.setThoricity(gD.isThorique());
            }
        }
    }