예제 #1
0
파일: Figure.cs 프로젝트: Galiks/Mercury
        public static void Intersect(int index)
        {
            Figure figure = Figures[index - 1];

            foreach (var item in Figures)
            {
                if (item != figure)
                {
                    figure.Intersect(item);
                }
            }
        }
예제 #2
0
 private static void GetIntersect(string[] splitCommand)
 {
     if (splitCommand.Length == 2)
     {
         if (Int32.TryParse(splitCommand[1], out int index))
         {
             Figure.Intersect(index);
         }
         else
         {
             Console.WriteLine("Incorrect syntax");
         }
     }
     else
     {
         Console.WriteLine("Unknown command");
     }
 }