Exemplo n.º 1
0
        public static FightTracker GetFightTracker()
        {
            Weebul.Core.Model.Fighter f1 = new Weebul.Core.Model.Fighter()

            {
                Stats = new FighterStats(Shared.Locator().Fighter1.SelectedFighter)
            };

            Weebul.Core.Model.Fighter f2 = new Weebul.Core.Model.Fighter()
            {
                Stats = new FighterStats(Shared.Locator().Fighter2.SelectedFighter)
            };

            Weebul.Core.Model.FightPlan fp1 = new Weebul.Core.Model.FightPlan()
            {
                FightPlanText = Shared.Locator().FightPlanF1.FightPlanText,
                WeblScript    = new Scripting.WeblScript()
            };
            Weebul.Core.Model.FightPlan fp2 = new Weebul.Core.Model.FightPlan()
            {
                FightPlanText = Shared.Locator().FightPlanF2.FightPlanText,
                WeblScript    = new Scripting.WeblScript()
            };
            if (!fp1.Validate())
            {
                MessageBox.Show("Fight plan 1 is invalid");
                return(null);
            }
            if (!fp2.Validate())
            {
                MessageBox.Show("Fight plan 2 is invalid");
                return(null);
            }

            FightTracker tracker = new FightTracker(f1, f2, fp1, fp2, Shared.Locator().Options.Options);

            return(tracker);
        }
Exemplo n.º 2
0
 public FightTracker(Fighter fighter1, Fighter fighter2, FightPlan fighter1Plan, FightPlan fighter2Plan, FightOptions options) : this()
 {
     this.Fighter1 = new FighterFight(fighter1, fighter1Plan);
     this.Fighter2 = new FighterFight(fighter2, fighter2Plan);
     this.Options  = options;
 }
Exemplo n.º 3
0
 public FighterFight(Fighter fighter, FightPlan fp)
 {
     this.Fighter   = fighter;
     this.FightPlan = fp;
     Reset();
 }