Ejemplo n.º 1
0
        private static void GetBestHint(LetterProp lp)
        {
            WordWarAI             wwai = new WordWarAI(LetterPropGrid);
            List <WordWarAI.Word> wl   = wwai.FindAllWords(lp);

            WordWarAI.Word bw = new WordWarAI.Word();
            foreach (WordWarAI.Word w in wl)
            {
                if (bw.GetScore < w.GetScore)
                {
                    bw = w;
                }
            }

            boardScript.ShowMsg("Best word is " + bw.GetWord);
        }
Ejemplo n.º 2
0
        internal static bool ProcessLetters()
        {
            for (int i = 0; i < gridsize; i++)
            {
                for (int j = 0; j < gridsize; j++)
                {
                    LetterProp curlp = LetterPropGrid[i, j];
                    if (curlp.IsBurning())
                    {
                        if (curlp.J <= 0)
                        {
                            // GameOver
                            return(true);
                        }

                        RemoveAndReplaceTile(curlp.I, curlp.J - 1);
                    }
                }
            }

            WordWarAI wwai = new WordWarAI(LetterPropGrid);

            return(!wwai.AnyWords());
        }