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

        } else {
            return 0;
        }
    }