Advertisement
Guest User

Untitled

a guest
Sep 17th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (* Start of part 2, getting all planes between ports *)
  2.             NEW(newlistbis);
  3.             newlistbis^.Init();
  4.             newlistbis := Consistency.GetAllPlanesWithDestination(t^.Planes, node(Airport.Airport)^.GetName());
  5.             nodebis := newlistbis^.GetFirstNode();
  6.             FOR teller1 := 1 TO newlistbis^.GetLength() BY 1 DO
  7.                 afstand := Consistency.GetDistanceBetweenPorts(t^.Planes, t^.Ports, nodebis(Airplane.Airplane)^.GetDepart(), nodebis(Airplane.Airplane)^.GetDest());
  8.                 fuelneeded := Consistency.GetFuelNeededForTrajectory(afstand, node(Airplane.Airplane));
  9.                 IF ((nodebis(Airplane.Airplane)^.GetFuel() <= nodebis(Airplane.Airplane)^.GetOrigFuel()- fuelneeded) &
  10.                 (~nodebis(Airplane.Airplane)^.GetLanded())) THEN
  11.                     INC(value2);
  12.                 END;
  13.                 nodebis := nodebis^.NextNode();
  14.             END;
  15.             Files.WriteString(rider, "===");
  16.             Strings.IntToStr(value2, tempstr);
  17.             Files.WriteString(rider, tempstr);
  18.             value2 := 0;
  19.             Files.WriteString(rider, "=====");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement