Exemplo n.º 1
0
 // 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;
 }
Exemplo n.º 2
0
 public static Distance GetDistanceFor(this Road road, MovementDirection direction)
 => road.GetStartingPointFor(direction).DistanceToOppositeLocation;
Exemplo n.º 3
0
 public static LocationId GetArrivalLocationId(this Road road, MovementDirection direction)
 => road.GetArrivalPointFor(direction).LocationId;
Exemplo n.º 4
0
 public static RoadPoint GetArrivalPointFor(this Road road, MovementDirection direction)
 => road.GetStartingPointFor(direction.Flip());