@Override
    public void update(final Observable o, final Object arg) {
        if (!SwingUtilities.isEventDispatchThread()) {
            SwingUtilities.invokeLater(new Runnable() {

                @Override
                public void run() {
                    update(o, arg);
                }
            });
            return;
        }
        if (o instanceof Modele) {
            this.getContentPane().remove(score);
            this.getContentPane().remove(grid);
            this.getContentPane().remove(pieces);
            Modele plateau = (Modele) o;
            updateGrid(plateau);
            score.setScore(plateau.getScore(),plateau.getNbLignes());
            if (plateau.getFin()){
                
                this.getContentPane().add(gameOver,BorderLayout.CENTER);
                this.getContentPane().add(score, BorderLayout.SOUTH);
                this.setVisible(true);
                this.getContentPane().repaint();
            }
            else {
                this.getContentPane().add(score, BorderLayout.WEST);
                this.getContentPane().add(grid, BorderLayout.CENTER);
                this.getContentPane().add(pieces, BorderLayout.EAST);
                this.getContentPane().repaint();
            }
        }
    }