Esempio n. 1
0
        public static CrosswordViewModel Instance()
        {
            if (_instance == null)
            {
                _instance = new CrosswordViewModel();
            }

            return(_instance);
        }
Esempio n. 2
0
        // Checks is entered word is correct
        public bool IsWordCorrect()
        {
            var changePos = GetUpdatePosition(CrosswordViewModel.Instance().DisplayBoard, CrosswordBoardMain.Instance().CrossWordBoardCheck);

            var foundWordListAndFoundWord = CheckWordOnCharUpdate(CrosswordViewModel.Instance().DisplayBoard, PlacementManager.Instance().PlacedWords, FoundWords);

            FoundWords = foundWordListAndFoundWord.Item1;

            // Change definition font colour
            var foundWord = foundWordListAndFoundWord.Item2;

            StyleDefinition(CrosswordViewModel.Instance().Definitions, foundWord);

            if (foundWordListAndFoundWord.Item2.Word != null)
            {
                return(true);
            }
            else
            {
                return(false);
            }
            //_mainPageViewModel.DisplayScore.Value = _foundWords.Count;
        }