public string getInfo(tekes cer) { if (kind == "merlin") { return(cer.MerlinInfo()); } else if (kind.ToLower() == "evil" || kind.ToLower() == "assassin" || kind.ToLower() == "mordred") { return(cer.evilsInfo()); } else { return("generic goods are clueless"); } }
public string[] ManageCeremony() { coll data = new coll(); data.status = "ceremony"; comm c = new comm(); c.PATCH("Games", GlobalVariables.Gamename, data); int nop = c.GET("Games", GlobalVariables.Gamename).NumberOfPlayers; string[] infos = new string[nop]; tekes Cer = new tekes(nop, makePlayerArray()); // add players array Cer.assign(); // assign each player his role Player[] p = Cer.players; coll d = new coll(); for (int i = 0; i < nop; i++) { d = new coll(); d.role = p[i].GetKind();// assigns the player his role from the random role generator if (i == 0) { d.is_leader = true; } if (p[i].GetKind() == "merlin")//merlin info problem { d.member = "good"; } else if (p[i].GetKind() == "mordred" || p[i].GetKind() == "assassin")//mordred info problem { d.member = "evil"; } else { d.member = p[i].GetKind(); } d.number = i; infos[i] = "you're: " + p[i].GetKind() + " " + p[i].getInfo(Cer); d.location = infos[i]; string reply = c.PATCH("Players", p[i].playerName, d); } return(infos); }