public VehicleDevelopViewModel(GameInfo gameInfo, Window window) { this.gameInfo = gameInfo; this.window = window; this.SpeedUp = new SpeedUpCommand(this); this.SpeedDown = new SpeedDownCommand(this); this.Kettei = new KetteiCommand(this); Name = $"{gameInfo.vehicles.Count + 1 + 100}系"; BestSpeed = 120; Seat = SeatEnum.None; TiltList = typeof(CarTiltEnum) .GetEnumValues() .Cast <CarTiltEnum>() .Where(tilt => { switch (tilt) { case CarTiltEnum.None: return(true); case CarTiltEnum.Pendulum: return(gameInfo.CanUsePendulum()); case CarTiltEnum.SimpleMecha: case CarTiltEnum.HighMecha: return(gameInfo.isDevelopedMachineTilt); default: throw new NotImplementedException($"車体傾斜装置{tilt}の表示条件が未定義です"); } }) .ToImmutableDictionary(seatEnum => seatEnum, seatEnum => seatEnum.ToName()); }