public void SetClosestGood(VehicleState vs) { ArbiterLane current = this.OpposingLane.LaneOnLeft; while (current != null) { if (!current.Way.WayId.Equals(OpposingWay) && current.RelativelyInside(vs.Front)) { this.ClosestGoodLane = current; break; } if (!current.Way.WayId.Equals(this.OpposingLane.Way.WayId)) { current = current.LaneOnRight; } else { current = current.LaneOnLeft; } } }