public void setGrid(Grid grid) {
        this.grid = grid;

        Slot[][] newCells = new Slot[grid.getNumRows()][grid.getNumColumns()];

        for (int r = 0; r < grid.getNumRows(); r++) {
            for (int c = 0; c < grid.getNumColumns(); c++) {
                if (r < cells.length && c < cells[0].length) {
                    newCells[r][c] = cells[r][c];
                }
                else {
                    newCells[r][c] = new Slot();
                }
            }
        }

        cells = newCells;

        needsAligned();
    }