private int[][] up() {//all numbers will go up and combine when possible
        int[][] egrid = clone2DArray(grid);
        for (int xIndex = 0; xIndex < 4; xIndex++) {
            for (int yIndex = 3; yIndex > 0; yIndex--) {
                if (egrid[yIndex - 1][xIndex] == 0) {
                    for (int a = yIndex - 1; a < 3; a++) {
                        egrid[a][xIndex] = egrid[a + 1][xIndex];
                    }
                    egrid[3][xIndex] = 0;
                }
            }
            for (int yIndex = 0; yIndex < 3; yIndex++) {
                if (egrid[yIndex + 1][xIndex] == egrid[yIndex][xIndex]) {
                    score += egrid[yIndex][xIndex];
                    egrid[yIndex][xIndex] += egrid[yIndex][xIndex];
                    egrid[yIndex + 1][xIndex] = 0;
                }
            }
            for (int yIndex = 3; yIndex > 0; yIndex--) {
                if (egrid[yIndex - 1][xIndex] == 0) {
                    for (int a = yIndex - 1; a < 3; a++) {
                        egrid[a][xIndex] = egrid[a + 1][xIndex];
                    }
                    egrid[3][xIndex] = 0;
                }
            }
        }
        return egrid;
    }