public int[][] down(int grid[][]) {
        score = 0;
        for (int xIndex = 0; xIndex < 4; xIndex++) {
            for (int yIndex = 0; yIndex < 3; yIndex++) {
                if (grid[yIndex + 1][xIndex] == 0) {
                    for (int a = yIndex + 1; a > 0; a--) {
                        grid[a][xIndex] = grid[a - 1][xIndex];
                    }
                    grid[0][xIndex] = 0;
                }
            }
            for (int yIndex = 3; yIndex > 0; yIndex--) {
                if (grid[yIndex - 1][xIndex] == grid[yIndex][xIndex]) {
                    score += grid[yIndex][xIndex];
                    grid[yIndex - 1][xIndex] += grid[yIndex][xIndex];
                    grid[yIndex][xIndex] = 0;
                }

            }
            for (int yIndex = 0; yIndex < 3; yIndex++) {
                if (grid[yIndex + 1][xIndex] == 0) {
                    for (int a = yIndex + 1; a > 0; a--) {
                        grid[a][xIndex] = grid[a - 1][xIndex];
                    }
                    grid[0][xIndex] = 0;
                }
            }
        }
        return grid;
    }