代码大全

(singke) #1
if ( FindPathThroughMaze ( Maze , NewPosition ) )
return (TRUE);

if ( MoveDown ( Maze , Position , &NewPosition ) )
if ( FindPathThroughMaze ( Maze , NewPosition ) )
return (TRUE );

if ( MoveRight ( Maze , Position , &NewPosition ) )
if ( FindPathThroughMaze ( Maze , NewPosition ) )
return ( TRUE);

return( FALSE );
}

ThisIsTheExit() TRUE( )

TRUE

16.3.2


AlreadyTried() ThisIsTheExit()


Pascal
Procedure RecursiveProc( var SafetyCounter : integer );
/* SafetyCounter Va r */
begin
if ( SafetyCounter > SAFETY_LIMIT ) then
exit;
SafetyCounter : = SafetyCounter + 1;


end;
Free download pdf