Пример #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);
        }
Пример #2
0
        public static void TestChargeSides()
        {
            GraphicsEngine.ClearCanvas();

            leftSide.Charge(rightSide);
            rightSide.Charge(leftSide);

            GraphicsEngine.TestDrawSides(leftSide, leftSidePen);
            GraphicsEngine.TestDrawSides(rightSide, rightSidePen);
        }