Beispiel #1
0
 public FightOutcome(int timeOfStoppage, MethodOfResult method, Main.Fighter winner, int[,] scorecards, Fighter[] fighters)
 {
     this.TimeOfStoppage = timeOfStoppage; //use double.PositiveInfinity for no KO
     this.Method         = method;
     this.Scorecards     = scorecards;
     this.Fighters       = fighters;
     this.Winner         = winner;
 }
Beispiel #2
0
 public FightOutcome(int timeOfStoppage, MethodOfResult method, Main.Fighter winner, int[,] scorecards, Fight fight)
     :
     this(timeOfStoppage, method, winner, scorecards, fight.Fighers)
 {
 }
Beispiel #3
0
 public int Index(Fighter f)
 {
     return(Index(f.Name));
 }
Beispiel #4
0
 public bool IsTopFighter(Fighter f)
 {
     return(IsTopFighter(f.Name));
 }
 public static double PercentWinsByKO(this List <FightSim.FightOutcome> fights, Main.Fighter fighter)
 {
     return(100d * fights.Wins(fighter, true) / fights.Wins(fighter, false));
 }
 public static int KOs(this List <FightSim.FightOutcome> fights, Main.Fighter fighter)
 {
     return(fights.Wins(fighter, true));
 }
 public static int Wins(this List <FightSim.FightOutcome> fights, Main.Fighter fighter, bool byKo = false)
 {
     return(fights.Where(outcome => outcome.Winner == fighter && (!byKo || outcome.IsKO())).Count());
 }
 public static double WinPercent(this List <FightSim.FightOutcome> fights, Main.Fighter fighter, bool byKo = false)
 {
     return((double)100 * fights.Wins(fighter, byKo) / fights.Count);
 }
Beispiel #9
0
 public void RegisterFighter(Fighter fighter)
 {
     Rating.AddFighter(fighter);
 }