private int checkDown(int num, int i, int y) {
        if (y - 1 >= 0 && board[i][y - 1] == num) {
            return checkDown(num, i, y - 1) + 1;
        } else {
            return 0;
        }
    }