public void CheckWord()
{
string subWord;
bool foundTestWord = false;
List<int> containedWords = new List<int>();
for (int i = 0; i < currLevel.subWords.Count; i++)
{
subWord = currLevel.subWords[i];
if (testWord.Equals(subWord))
{
HighLightWyrd(i);
Score_manager.SCORE(wyrds[i], 1);
foundTestWord = true;
}
else if(testWord.Contains(subWord))
{
containedWords.Add(i);
}
}
if (foundTestWord)
{
int numContained = containedWords.Count;
int ndx;
for (int i = 0; i < containedWords.Count; i++)
{
ndx = numContained - i - 1;
HighLightWyrd(containedWords[ndx]);
Score_manager.SCORE(wyrds[containedWords[ndx]], i + 2);
}
}
ClearBigLettersActive();
}
void HighLightWyrd(int ndx)
{
wyrds[ndx].found = true;
wyrds[ndx].color = (wyrds[ndx].color + Color.white) / 2f;
wyrds[ndx].visible = true;
}
void ClearBigLettersActive()
{
testWord = "";
foreach(Letter ltr in bigLettersActive)
{
bigLetters.Add(ltr);
ltr.color = bigColorDim;
}
bigLettersActive.Clear();
ArrangeBigLetters();
}