void addStun(string busterID, string stunnedBusterID) { // StunEvent stunEvent = new StunEvent() { Round = Round - 1, BusterID = busterID, StunnedBusterID = stunnedBusterID }; StunEvents.Add(stunEvent); // Console.Error.WriteLine("Buster " + busterID + " has stunned " + stunnedBusterID); }
bool isValidStunTimer(string busterID) { if (StunEvents.Exists(s => s.BusterID == busterID)) { int latestRound = StunEvents.Where(s => s.BusterID == busterID).OrderByDescending(s => s.Round).First().Round; if ((Round - latestRound) < LimBustStunTimer) { return(false); } } return(true); }
bool isValidStunTimer(string busterID) { if (StunEvents.Exists(s => s.BusterID == busterID)) { int latestRound = StunEvents.Where(s => s.BusterID == busterID).OrderByDescending(s => s.Round).First().Round; if ((Round - latestRound) < LimBustStunTimer) { return(false); } } Console.Error.WriteLine("StunEvents Dump"); foreach (StunEvent e in StunEvents) { Console.Error.WriteLine("" + e.Round + " " + e.BusterID + " " + e.StunnedBusterID); } return(true); }