private Object[][][] toCompressedArray(List<Locatable>[][] grid) {
            Object[][][] newGrid = new Object[this.xNumCells][this.yNumCells][];
            for (int xi = 0; xi < grid.length; xi++) {
                List<Locatable>[] xar = grid[xi];
                for (int yi = 0; yi < xar.length; yi++) {
                    List<Locatable> cell = xar[yi];
                    if (cell != null) {
                        newGrid[xi][yi] = cell.toArray();
                    }
                }
            }
            return newGrid;
        }