public LevelOneViewModel()
        {
            ICategory category = SQLServerModel.getWord(PlayerModel.Instance.Category);

            _cluesGenrator = new CluesModel(category);
            string word = category.Name;

            _timer = new TimeModel(80);
            _timer.PropertyChanged += _timer_PropertyChanged;
            _game = new LevelOneModel(word, _timer, Globals.hidddenPercentage);
            _game.PropertyChanged += _game_PropertyChanged;
            _game.start();
            //_timer.start();
        }
Esempio n. 2
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();
        }
Esempio n. 3
0
        public LevelOneViewModel()
        {
            // get the hidden word
            ICategory category = SQLServerModel.Instance.getWord(PlayerModel.Instance.Category);

            _cluesGenrator = new CluesModel(category);
            string word = category.Name;

            // register for time notifications
            _timer = new TimeModel(Globals.levelTime);
            _timer.PropertyChanged += _timer_PropertyChanged;
            // create game with current plater score
            int score = PlayerModel.Instance.Score;

            _game = new LevelOneModel(word, _timer, Globals.hidddenPercentage, score);
            _game.PropertyChanged += _game_PropertyChanged;
            _game.GameOver        += _game_GameOver;
            _game.start();
            baseBuilder(_game, score, word);
        }