예제 #1
0
        public static void Main(string[] args)
        {
            int myName0 = (int)Name.Faruk;
            int myName1 = (int)Name.Oguz;
            int myName2 = (int)Name.Senol;
            int myName3 = (int)Name.Merve;
            int myName4 = (int)Name.Mehmet;
            int myName5 = (int)Name.Ahmet;

            Plan plan = new Plan(6);

            //Creating dislike conn.
            plan.DislikeConnection(myName0, myName1);
            plan.DislikeConnection(myName0, myName2);
            plan.DislikeConnection(myName0, myName3);
            plan.DislikeConnection(myName1, myName3);
            plan.DislikeConnection(myName3, myName4);
            plan.DislikeConnection(myName4, myName5);
            plan.DislikeConnection(myName5, myName2);
            plan.DislikeConnection(myName2, myName5);
            plan.DislikeConnection(myName3, myName0);
            plan.DislikeConnection(myName1, myName0);

            //printing table
            Console.WriteLine("This is the Sitting Plan For Aunt's NamesDay");
            plan.Connection();
            foreach (KeyValuePair <string, Stack <int> > table in tables)
            {
                Console.WriteLine("--------------------------------------");
                Console.WriteLine("{0}", table.Key);
                foreach (int person in table.Value)
                {
                    Console.WriteLine("Person: {0}", (Name)person);
                }
                Console.WriteLine("--------------------------------------");
            }
        }