Wegsuche im Labyrinth II

 [Vorherige Seite]  [Inhaltsverzeichnis]  [Nächste Seite]  [Nächstes Kapitel]

PathFinder.m2
PROCEDURE Find(x, y: MazeIndex; dir: Direction) : Direction;
BEGIN
   dir := PreviousDirection(dir);
   LOOP
      IF ~Wall(x, y, dir) THEN
         RETURN dir
      END;
      dir := NextDirection(dir);
   END;
END Find;

 [Vorherige Seite]  [Inhaltsverzeichnis]  [Nächste Seite]  [Nächstes Kapitel]
Copyright © 1999 Andreas Borchert, in HTML konvertiert am 04.02.1999