Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (* Start of part 2, getting all planes between ports *)
- NEW(newlistbis);
- newlistbis^.Init();
- newlistbis := Consistency.GetAllPlanesWithDestination(t^.Planes, node(Airport.Airport)^.GetName());
- nodebis := newlistbis^.GetFirstNode();
- FOR teller1 := 1 TO newlistbis^.GetLength() BY 1 DO
- afstand := Consistency.GetDistanceBetweenPorts(t^.Planes, t^.Ports, nodebis(Airplane.Airplane)^.GetDepart(), nodebis(Airplane.Airplane)^.GetDest());
- fuelneeded := Consistency.GetFuelNeededForTrajectory(afstand, node(Airplane.Airplane));
- IF ((nodebis(Airplane.Airplane)^.GetFuel() <= nodebis(Airplane.Airplane)^.GetOrigFuel()- fuelneeded) &
- (~nodebis(Airplane.Airplane)^.GetLanded())) THEN
- INC(value2);
- END;
- nodebis := nodebis^.NextNode();
- END;
- Files.WriteString(rider, "===");
- Strings.IntToStr(value2, tempstr);
- Files.WriteString(rider, tempstr);
- value2 := 0;
- Files.WriteString(rider, "=====");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement