// HACK: This is internal and not private for Player to be able to reconstruct it from state. public RoadMovementComponent(Road road, Distance progress, MovementDirection direction) { Road = road; Progress = progress; Direction = direction; }
public static Distance GetDistanceFor(this Road road, MovementDirection direction) => road.GetStartingPointFor(direction).DistanceToOppositeLocation;
public static LocationId GetArrivalLocationId(this Road road, MovementDirection direction) => road.GetArrivalPointFor(direction).LocationId;
public static RoadPoint GetArrivalPointFor(this Road road, MovementDirection direction) => road.GetStartingPointFor(direction.Flip());