예제 #1
0
 public clsPlayer(string Name, clsGame Owner) : this()
 {
     this.Name  = Name;
     this.Owner = Owner;
     if (Owner != null)
     {
         Owner.frm.Controls.Add(lblDispResources);
     }
 }
예제 #2
0
 public clsZones(clsGame Container) : this()
 {
     this.Container = Container;
 }
예제 #3
0
        public void LoadGame(string file)
        {
            Game = new clsGame(this, file, Application.StartupPath);
            Game.AddPlayer("Jorge");
            this.Text = "Cyberark Tester"; //Game.Name;

            MSScriptControl.ScriptControl sc = new MSScriptControl.ScriptControl();
            sc.Language = "VBScript";
            sc.AllowUI  = true;
            StringWrapper tst = new StringWrapper("Sub Mio()\r\n" +
                                                  "dim i\r\n" +
                                                  " i=1\r\n" +
                                                  " i=i+1\r\n" +
                                                  " msgbox \"Valore:\"&i\r\n" +
                                                  " Game.GetActivePlayer.Print()\r\n" +
                                                  "End Sub");

            sc.AddCode(tst.ToString());
            sc.AddObject("Game", Game);

            //sc.Run("Mio");
            //sc.ExecuteStatement("msgbox \"hi\" ");

            //Fix This should be in the setp
            Game.GetActivePlayer().Hand        = Game.Zones["hand"];
            Game.GetActivePlayer().Play        = Game.Zones["play"];
            Game.GetActivePlayer().Deck        = Game.Zones["deck"];
            Game.GetActivePlayer().Discard     = Game.Zones["discard"];
            Game.GetActivePlayer().VictoryPile = Game.Zones["victorypile"];

            Game.Zones["deck"].Owner        = Game.GetPlayer("Jorge");
            Game.Zones["play"].Owner        = Game.GetPlayer("Jorge");
            Game.Zones["hand"].Owner        = Game.GetPlayer("Jorge");
            Game.Zones["discard"].Owner     = Game.GetPlayer("Jorge");
            Game.Zones["victorypile"].Owner = Game.GetPlayer("Jorge");

            Game.Zones.AddCard2Zone("bystanders", "Bystander");
            Game.Zones.AddCard2Zone("wounds", "Wound");
            Game.Zones.AddCard2Zone("heroedeck", "Avengers", "Heroe", 3 * 4);
            Game.Zones["heroedeck"].shuffle();

            Game.Zones.AddCard2Zone("villaindeck", "Brotherhood", "Villain");
            Game.Zones.AddCard2Zone("villaindeck", "Hand Ninja", "Villain");
            Game.Zones.AddCard2Zone("villaindeck", "Master Strike");
            Game.Zones.AddCard2Zone("villaindeck", "Bystander", "Bystander", 1);
            Game.Zones["villaindeck"].shuffle();

            Game.Zones.AddCard2Zone("shield", "S.H.I.E.L.D. Officer - Maria Hill");
            Game.Zones.AddCard2Zone("scheme", "Midtown Bank Robbery");

            Game.Zones["heroedeck"].drawCard(5);
            Game.Zones["villaindeck"].drawCard();
            Game.Zones.LoadDeck("startup", 0);
            Game.Zones["deck"].shuffle();
            Game.Zones["deck"].drawCard(6);

            Game.Zones.AddCard2Zone("mastermind", string.Empty, "Mastermind", 1);
            this.Refresh();
            //timTimer.Enabled=true;
            Game.GetActivePlayer().Refresh();
            btnEndTurn.Visible = true;
            btnEndTurn.BringToFront();
            btnEndTurn.Show();
        }