Exemple #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();
            }
        }
Exemple #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();
            }
        }
Exemple #3
0
 public StepEventArgs(Directions direction, RandomWalker walker)
 {
     Direction = direction;
     Walker = walker;
 }
Exemple #4
0
 public StepEventArgs(Directions direction, RandomWalker walker)
 {
     Direction = direction;
     Walker    = walker;
 }