public DuelGameCommandEditorWindowViewModel(DuelGameCommandModel command) : base(command) { this.TimeLimit = command.TimeLimit; this.UserSelectionTargeted = command.PlayerSelectionType.HasFlag(GamePlayerSelectionType.Targeted); this.UserSelectionRandom = command.PlayerSelectionType.HasFlag(GamePlayerSelectionType.Random); this.StartedCommand = command.StartedCommand; this.NotAcceptedCommand = command.NotAcceptedCommand; this.SuccessfulOutcome = new GameOutcomeViewModel(command.SuccessfulOutcome); this.FailedCommand = command.FailedCommand; }
public override async Task UpdateExistingCommand(CommandModelBase command) { await base.UpdateExistingCommand(command); DuelGameCommandModel gCommand = (DuelGameCommandModel)command; gCommand.TimeLimit = this.TimeLimit; gCommand.PlayerSelectionType = this.GetSelectionType(); gCommand.StartedCommand = this.StartedCommand; gCommand.NotAcceptedCommand = this.NotAcceptedCommand; gCommand.SuccessfulOutcome = this.SuccessfulOutcome.GetModel(); gCommand.FailedCommand = this.FailedCommand; }