Ejemplo n.º 1
0
 public CrozzleGrid(WordList list)
 {
     Grid                         = CreateGrid();
     ListOfNames                  = list;
     Ptable                       = new PointsTable();
     ListOfNamesInGrid            = new List <Word>();
     ListOfNamesInGridString      = new List <string>();
     ListOfNamesInGridCopy        = new List <Word>();
     Counter                      = 0;
     Next                         = false;
     Score                        = 0;
     AllIntersectingLettersInGrid = new List <char>();
 }
Ejemplo n.º 2
0
        private int GetScoreOfWord()
        {
            PointsTable pt      = new PointsTable();
            int         score   = 0;
            var         letters = IntersectingWords.Values.First();

            foreach (var key in letters)
            {
                var letter = key.Key;

                foreach (var let in pt.PointsPerLetter)
                {
                    if (letter == let.Key)
                    {
                        score = score + let.Value;
                    }
                }
            }

            return(score);
        }