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.
6 messages · Page 1 of 1 (latest)
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.
{
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
Did you mean to have that return fullBoard = ...?
That's going to make the function return
having it be return fullBoard = true/false still has it exit all recursions