public found[] separate(string msg) { ArrayList list = new ArrayList(); string temp = ""; for (int i = 0; i < msg.Length; i++) { if (msg[i] != ' ') { temp += msg[i]; } else { list.Add(temp); temp = ""; } } if (temp.Length != 0) { list.Add(temp); } found[] all = new found[list.Count]; for (int i = 0; i < list.Count; i++) { string word = (string)list[i]; all[i] = new found(); all[i].word = word.Substring(0, word.IndexOf(":")); string id = word.Substring(word.IndexOf(":") + 1, word.Length - (word.IndexOf(":") + 1)); if (id.Equals("n")) { all[i].id = 0; } else if (id.Equals("v")) { all[i].id = 1; } else if (id.Equals("adj")) { all[i].id = 2; } else if (id.Equals("an")) { all[i].id = 3; } else if (id.Equals("sy")) { all[i].id = 4; } else if (id.Equals("adv")) { all[i].id = 5; } } return(all); }
findEvos(found, data);
addMonster(found, index, tag, encounter);