Beispiel #1
0
        public void Test1()
        {
            string[] a = new string[] { "NORTH", "SOUTH", "SOUTH", "EAST", "WEST", "NORTH", "WEST" };
            string[] b = new string[] { "WEST" };

            CollectionAssert.AreEqual(b, DirReduction.DirReduc(a));
        }
        static void Main(string[] args)
        {
            string[] a = new string[] { "NORTH", "SOUTH", "SOUTH", "EAST", "WEST", "NORTH", "WEST" };
            string[] b = new string[] { "NORTH", "WEST", "SOUTH", "EAST" };
            string[] c = new string[] { "NORTH" };
            string[] e = { "EAST", "EAST", "WEST", "NORTH", "WEST", "EAST", "EAST", "SOUTH", "NORTH", "WEST" };
            string[] d = { "NORTH", "EAST", "NORTH", "EAST", "WEST", "WEST", "EAST", "EAST", "WEST", "SOUTH" };


            Array.ForEach(DirReduction.Reduction(d), (element) => Console.WriteLine(element));
        }
Beispiel #3
0
 public static void Main(string[] args)
 {
     PrintArray(
         DirReduction.dirReduc(new string[] { "NORTH", "SOUTH", "SOUTH", "EAST", "WEST", "NORTH", "WEST" })
         ); // { "WEST"}
     PrintArray(
         DirReduction.dirReduc(new string[] { "NORTH", "SOUTH", "SOUTH", "EAST", "WEST", "NORTH" })
         ); // { }
     PrintArray(
         DirReduction.dirReduc(new string[] { "NORTH", "WEST", "SOUTH", "EAST" })
         ); // "NORTH", "WEST", "SOUTH", "EAST"
 }