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