public BaseRoundDataVO(List <IRoundItem> items, List <IRoundItem> solutions, LevelState levelState, WarmUpState warmUpState, int timeout) { WarmUpState = warmUpState; Timeout = timeout; LevelState = levelState; Solutions = solutions; Items = items; }
// Items contain all the elemnts that are shown in the selection part of the exercise, // they are the possible answers and are updated (almost) every round // Use them to update the view in CreateRound public FlashGlanceRoundDataVO(List <FlashGlanceRoundItemVO> items, List <IRoundItem> solutions, LevelState levelState, WarmUpState warmUpState, int timeout, List <FlashGlanceRoundItemVO> questQueue, int questIndex, int numberOfRows, int numberOfColumns) : base(items.Cast <IRoundItem>().ToList(), solutions, levelState, warmUpState, timeout) { QuestQueue = questQueue; QuestIndex = questIndex; NumberOfRows = numberOfRows; NumberOfColumns = numberOfColumns; }
public BaseExerciseModel(IExerciseConfiguration config, IExerciseInitVO initVO, ILogger logger) { _logger = logger; ExerciseConfiguration = config; ExerciseInitVO = initVO; _exerciseSettings = initVO.Settings; // Init the property changes for tracking _propertiesUpdates = new Dictionary <Type, IModelPropertyUpdateVO>(); _totalGoodRuns = 0; TotalRuns = 0; _currentGoodRuns = 0; _currentBadRuns = 0; GoodRunsInARow = 0; _warmUpRoundsCounter = 1; _warmUpEnabeld = initVO.WarmUpEnabled; _startDifficulty = (initVO.StartDifficulty > ExerciseConfiguration.MaxDifficulty) ? ExerciseConfiguration.MaxDifficulty : initVO.StartDifficulty; #pragma warning disable RECS0021 // Warns about calls to virtual member functions occuring in the constructor _multiplier = InitMultiplier(_startDifficulty, ExerciseConfiguration); #pragma warning restore RECS0021 // Warns about calls to virtual member functions occuring in the constructor // listen to multiplier changes _multiplier.OnChanged += OnMultiplierChanged; #pragma warning disable RECS0021 // Warns about calls to virtual member functions occuring in the constructor _bonusScore = GetScoreForStartingDifficulty(_startDifficulty); #pragma warning restore RECS0021 // Warns about calls to virtual member functions occuring in the constructor _currentDifficulty = _startDifficulty; AddPropertyUpdate(new BadRunsToLevelDownUpdateVO(ExerciseConfiguration.GetBadRunsByLevel(_startDifficulty), ExerciseConfiguration.GetBadRunsByLevel(_startDifficulty))); AddPropertyUpdate(new GoodRunsToLevelUpUpdateVO(ExerciseConfiguration.GetGoodRunsByLevel(_startDifficulty), ExerciseConfiguration.GetGoodRunsByLevel(_startDifficulty))); AddPropertyUpdate(new DifficultyUpdateVO(_startDifficulty, _startDifficulty)); AddPropertyUpdate(new MaxDifficultyUpdateVO(ExerciseConfiguration.MaxDifficulty, ExerciseConfiguration.MaxDifficulty)); _warmUpState = _warmUpEnabeld && (ExerciseConfiguration.GetWarmUpRoundsByLevel(_currentDifficulty) > 0)?WarmUpState.Enabled:WarmUpState.Disabled; if (_warmUpState == WarmUpState.Enabled) { var originalValue = ExerciseConfiguration.GetWarmUpRoundsByLevel(_currentDifficulty); AddPropertyUpdate(new WarmUpUpdateVO(originalValue, originalValue, originalValue)); } _lastRoundLevelChange = LevelState.NEW; }
public MemoflowRoundDataVO(List <IRoundItem> items, List <IRoundItem> solutions, LevelState levelState, WarmUpState warmUpState, int timeout, int numCards, MemoflowMatchType[] matchTypes, string tutorialTextId) : base(items, solutions, levelState, warmUpState, timeout) { NumCards = numCards; MatchTypes = matchTypes; TutorialTextId = tutorialTextId; }
public BaseRoundDataVO(List <IRoundItem> items, List <IRoundItem> solutions, LevelState levelState, WarmUpState warmUpState, int timeout, int memorizeTimeout) : this(items, solutions, levelState, warmUpState, timeout) { MemorizeTimeout = memorizeTimeout; }