void movePieces(Project2_Move_Thompson m) {
        int fromRow = Project2_Board_Thompson.ROW(m.from);
        int fromCol = Project2_Board_Thompson.COL(m.from);
        int toRow = Project2_Board_Thompson.ROW(m.to);
        int toCol = Project2_Board_Thompson.COL(m.to);
        square[toRow][toCol].setIcon(new ImageIcon(
            pieceImage[board.color[m.to]][board.piece[m.to]]));
        square[fromRow][fromCol].setIcon(null);
        if ((m.bits & 2) != 0) { // castling move
            if (m.from == Project2_Board_Thompson.E1 && m.to == Project2_Board_Thompson.G1)
                movePieces(new Project2_Move_Thompson(Project2_Board_Thompson.H1, Project2_Board_Thompson.F1, (char) 0, (char) 0));
            else if (m.from == Project2_Board_Thompson.E1 && m.to == Project2_Board_Thompson.C1)
                movePieces(new Project2_Move_Thompson(Project2_Board_Thompson.A1, Project2_Board_Thompson.D1, (char) 0, (char) 0));
            else if (m.from == Project2_Board_Thompson.E8 && m.to == Project2_Board_Thompson.G8)
                movePieces(new Project2_Move_Thompson(Project2_Board_Thompson.H8, Project2_Board_Thompson.F8, (char) 0, (char) 0));
            else if (m.from == Project2_Board_Thompson.E8 && m.to == Project2_Board_Thompson.C8)
                movePieces(new Project2_Move_Thompson(Project2_Board_Thompson.A8, Project2_Board_Thompson.D8, (char) 0, (char) 0));
        }
    }