Example #1
0
        public static void RunTests()
        {
            Console.WriteLine(Environment.NewLine + "Testing RandomWalker (c# way)");
            RandomWalker walker = new RandomWalker();
            RandomWalkerObserver observer = new RandomWalkerObserver();

            walker.OnStepMade += observer.Moved;

            for (int i = 0; i < 100000; i++)
            {
                walker.MakeStep();
            }
        }
Example #2
0
        public static void RunTests()
        {
            Console.WriteLine(Environment.NewLine + "Testing RandomWalker (c# way)");
            RandomWalker         walker   = new RandomWalker();
            RandomWalkerObserver observer = new RandomWalkerObserver();

            walker.OnStepMade += observer.Moved;

            for (int i = 0; i < 100000; i++)
            {
                walker.MakeStep();
            }
        }
Example #3
0
 public StepEventArgs(Directions direction, RandomWalker walker)
 {
     Direction = direction;
     Walker = walker;
 }
Example #4
0
 public StepEventArgs(Directions direction, RandomWalker walker)
 {
     Direction = direction;
     Walker    = walker;
 }