예제 #1
0
        static void Main(string[] args)
        {
            Point A = new Point(1, 1, "A");
            Point B = new Point(1, 2, "B");
            Point C = new Point(2, 2, "C");
            Point D = new Point(2, 1, "D");
            //Point E = new Point(3, 2, "E");
            Figure Figure = new Figure(A, B, C, D); //, E);

            Point[] points  = { A, B, C, D };       //, E };
            Figure1 Figure1 = new Figure1(points);

            //Figure.PerimeterCalculator();
            //Figure1.PerimeterCalculator();

            Console.WriteLine("Figure perimeter {0}", Figure.Perimeter);
            Console.WriteLine("Figure1 perimeter {0}", Figure1.Perimeter);
            Console.ReadKey();
        }
예제 #2
0
 public void fillingStack()
 {
     playerStack[0]  = new Figure1(playerNumber);
     playerStack[1]  = new Figure2(playerNumber);
     playerStack[2]  = new Figure3(playerNumber);
     playerStack[3]  = new Figure4(playerNumber);
     playerStack[4]  = new Figure5(playerNumber);
     playerStack[5]  = new Figure6(playerNumber);
     playerStack[6]  = new Figure7(playerNumber);
     playerStack[7]  = new Figure8(playerNumber);
     playerStack[8]  = new Figure9(playerNumber);
     playerStack[9]  = new Figure10(playerNumber);
     playerStack[10] = new Figure11(playerNumber);
     playerStack[11] = new Figure12(playerNumber);
     playerStack[12] = new Figure13(playerNumber);
     playerStack[13] = new Figure14(playerNumber);
     playerStack[14] = new Figure15(playerNumber);
     playerStack[15] = new Figure16(playerNumber);
     playerStack[16] = new Figure17(playerNumber);
     playerStack[17] = new Figure18(playerNumber);
     playerStack[18] = new Figure19(playerNumber);
     playerStack[19] = new Figure20(playerNumber);
     playerStack[20] = new Figure21(playerNumber);
 }