///<summary> ///Update class memeber after class creation ///</summary> protected void baseBuilder(BaseLevelModel game, int score, string word) { Score = score; _game = game; Category = Globals.categoryText + PlayerModel.Instance.Category; PlayerModel.Instance.lastWord = word; _numOfClues = 0; }
/// <summary>Class <c>LevelThreeViewModel</c> /// Create the game calss with needed parameters /// using BaseLevelViewModel /// </summary> public LevelThreeViewModel() { ICategory category = SQLServerModel.Instance.getWord(PlayerModel.Instance.Category); _cluesGenrator = new CluesModel(category); string word = category.Name; _timer = new TimeModel(Globals.levelTime); _timer.PropertyChanged += _timer_PropertyChanged; int score = PlayerModel.Instance.Score; BaseLevelModel game = new BaseLevelModel(word, _timer, Globals.hidddenPercentage, score); baseBuilder(game, score, word); game.PropertyChanged += _game_PropertyChanged; game.GameOver += _game_GameOver; game.start(); }