public TravelSummaryViewModel(MethodResult canTravel, Path travelPath, MovingTicket ticket) { CanTravel = canTravel.isSuccess; if (CanTravel == false) { CannotTravelReason = canTravel.ToString(); } if (Math.Abs((travelPath?.Distance ?? 0) - 0) < 0.0001) { Distance = null; } else { Distance = travelPath.Distance; } TicketTravelDistance = ticket.TravelDistance; HpLoss = ticket.HpLoss; }