public void TestAgain() { DataHelpers.Entities.Fights.Load(); HashSet <CutBase> doNothingCuts = new HashSet <CutBase>(); var something = DataHelpers.Entities.Fights.Where(f => f.FightId >= 19 && !f.BadResult); foreach (Fight fight in something) { fight.SetCuts(); FighterStats stats1 = new FighterStats(fight.Fighter1); FighterStats stats2 = new FighterStats(fight.Fighter2); foreach (Data.Round round in fight.Rounds) { List <CutBase> cuts1 = FightHelpers.GetCutsForDataRound(round.First); List <CutBase> cuts2 = FightHelpers.GetCutsForDataRound(round.Second); CutPenalty cp1 = CutBase.CalculatePenaltyForCuts(FightHelpers.GetCutsForDataRound(round.First)); CutPenalty cp2 = CutBase.CalculatePenaltyForCuts(FightHelpers.GetCutsForDataRound(round.Second)); if (round.First.Tactic.Aggressiveness == 1) { continue; } if (FightHelpers.RoundMatchesExpectations(round, stats1, stats2, true, 0)) { if (!cp1.HasNone || !cp2.HasNone) { Debug.Print("HMMM"); } if (cuts1.Count > 0 || cuts2.Count > 0) { doNothingCuts.UnionWith(cuts1); doNothingCuts.UnionWith(cuts2); } } else { if (cp1.HasNone && cp2.HasNone) { Debug.Print("uh oh?"); if (FightHelpers.RoundMatchesExpectations(round, stats1, stats2, true, 0.1)) { Debug.Print("Looks like, just a rounding thing"); } else { Debug.Print("No it's worse"); } } } } } foreach (CutBase cb in doNothingCuts) { Debug.Print(cb.ToString() + " does nothing!"); } }
public void TestDamageForDataFightTest() { List <Data.Fight> fightList = DataHelpers.Entities.Fights.Where(f => f.FightId >= 19 && !f.BadResult).ToList(); HashSet <CutBase> allCuts = new HashSet <CutBase>(); foreach (Data.Fight f in fightList) { f.SetCuts(); HashSet <CutBase> cutSet = FightHelpers.TestDamageForDataFight(f, 0); allCuts.UnionWith(cutSet); } Debug.Print("Good"); }