Exemplo n.º 1
0
        public static void TestInitSides(PictureBox pictureBox)
        {
            GraphicsEngine.Init(pictureBox);

            //leftSide.PopulateGenerals(1, new List<int>[] { new List<int>() { 1 } });
            //leftSide.Generals[0].Armies[0].Units[0].Health = 1000000000;
            //leftSide.Generals[0].Armies[0].Units[0].Radius = 10000000; catapult test.
            //leftSide.Generals[0].Armies[0].Units[0].Damage = 100;

            leftSide.PopulateGenerals(3, new List <int>[] { new List <int>()
                                                            {
                                                                10, 20, 10
                                                            }, new List <int>()
                                                            {
                                                                50, 60
                                                            }, new List <int>()
                                                            {
                                                                70, 80
                                                            } });
            rightSide.PopulateGenerals(2, new List <int>[] { new List <int>()
                                                             {
                                                                 5, 10
                                                             }, new List <int>()
                                                             {
                                                                 20, 50
                                                             } });
            leftSidePen  = new Pen(Color.Red, 2);
            rightSidePen = new Pen(Color.Blue, 2);
            leftSide.MakeTestFormation(50, 100);
            rightSide.MakeTestFormation(500, 400);

            GraphicsEngine.TestDrawSides(leftSide, leftSidePen);
            GraphicsEngine.TestDrawSides(rightSide, rightSidePen);
        }
Exemplo n.º 2
0
        public static void UnitTestInit(PictureBox pictureBox)
        {
            GraphicsEngine.Init(pictureBox);
            b.Range  = 2000;
            a.Target = b;
            b.Target = a;

            a.Location = new Point(0, 0);
            b.Location = new Point(200, 300);

            GraphicsEngine.DrawUnits();
        }
Exemplo n.º 3
0
        public static void TestInitArmy(PictureBox pictureBox)
        {
            GraphicsEngine.Init(pictureBox);

            LeftArmy.PopulateArmy(100);
            RightArmy.PopulateArmy(200);
            LeftArmy.CreateTestFormation(50, 100, 50);
            RightArmy.CreateTestFormation(300, 350, 50);
            LeftArmyPen  = new Pen(Color.Red, 2);
            RightArmyPen = new Pen(Color.Blue, 2);

            GraphicsEngine.TestDrawArmy(LeftArmy, LeftArmyPen);
            GraphicsEngine.TestDrawArmy(RightArmy, RightArmyPen);
        }
Exemplo n.º 4
0
        public static void TestInitGeneral(PictureBox pictureBox)
        {
            GraphicsEngine.Init(pictureBox);

            leftGeneral.PopulateArmies(2, new int[] { 100, 50 });
            rightGeneral.PopulateArmies(3, new int[] { 100, 100, 150 });
            leftGeneralPen  = new Pen(Color.Red, 2);
            rightGeneralPen = new Pen(Color.Blue, 2);
            leftGeneral.MakeTestFormation(50, 100);
            rightGeneral.MakeTestFormation(300, 500);

            GraphicsEngine.TestDrawGenerals(leftGeneral, leftGeneralPen);
            GraphicsEngine.TestDrawGenerals(rightGeneral, rightGeneralPen);
        }
Exemplo n.º 5
0
 public static void InitMap(PictureBox pictureBox)
 {
     mapGenerator = new MapGenerator();
     GraphicsEngine.Init(pictureBox);
 }