#recursion help

6 messages · Page 1 of 1 (latest)

flint zodiacBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

raw otter
#
{
    fullBoard = checkBoard(chessBoard);
    if (fullBoard)
    {
        return fullBoard = true;
    }

    if (row - 2 > -1 && col + 1 < 5)
{
    if (chessBoard[row - 2][col + 1] < 1)
    {
        tries++;
        chessBoard[row - 2][col + 1] = moveNum;
        return fullBoard = moveKnight(row - 2, col + 1, moveNum + 1, fullBoard);
        chessBoard[row - 2][col + 1] - moveNum;
    }
}
...      
    
    if (fullBoard)
    {
        return true;
    }

    return false;
}
#

(simplified so discord lets me post it

mystic lance
#

That's going to make the function return

raw otter
#

having it be return fullBoard = true/false still has it exit all recursions