void update(Move m) {
        if (m != null) {
            int index0 = (m.getCol0() - 1) + 8 * (8 - m.getRow0());
            int index1 = (m.getCol1() - 1) + 8 * (8 - m.getRow1());
            if (((JPanel) _gameboard.getComponent(index1)).getComponentCount() >
                     0) {
                ((JPanel) _gameboard.getComponent(index1)).removeAll();
            }
            PieceGUI old = ((PieceGUI) ((JPanel) _gameboard.getComponent(
                    index0)).getComponent(0));
            ((JPanel) _gameboard.getComponent(index0)).remove(0);
            old.setIndex(index1);
            ((JPanel) _gameboard.getComponent(index1)).add(old);
            ((JPanel) _gameboard.getComponent(index0)).repaint();
            ((JPanel) _gameboard.getComponent(index1)).repaint();
        }
        if (_selectedPiece != null) {
            _selectedPiece.setSelected(false);
            _selectedPiece.repaint();
            _selectedPiece = null;
        }

    }