Self assignments (
i=i; j=j;
) as already noted by
PIEBALDconsult, are useless.
In any case, your outer loop should be executed exactly three times, and for each of such iterations
the inner loop should be executed exactly three times.
[update]
As
PIEBALDconsult pointed out
j=j
is a mistake (I overlooked it): at first outer loop iteration it is useless but harmless. Since second outer iteration, however,
j=j
is equivalent to
j=y+1
, preventing inner loop execution.
[/update]
However, at any iteration, if the condition
game[GAME_BOARD][i][j] == num
is true then the loops are immediately exited due to the
return false;
statement.