mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
c9e0fe52d5
deriveDriveWarnings knew the distance and threw the position away. The warning is filed against the stop the car ARRIVES at, which can be most of a leg past the point the fuel actually ran out — fine for a warning, useless for a suggestion, because a filling station offered at the warning is one the car cannot reach. emptyAt is a fourth field on the return object rather than a field on each warning, for two reasons. Five tests assert warnings with toEqual and an extra defined property fails them all. And a dry point is once per TANK while a warning is once per stop: a long stretch with nothing on it warns repeatedly on purpose, and one refuel offer per warning would stack three identical offers for one fill-up down a single day. drivenMeters counts driving legs only, which is the whole reason it is counted here rather than derived later. The day's drawn line concatenates every run, ferries and walks included, while the budget skips those — so walking that line to the same figure overshoots by the length of any crossing the day contains and puts the marker out at sea. pointAtMeters walks the driving-only line instead.