コード例 #1
0
ファイル: RandomWalkerTester.cs プロジェクト: vtsvang/cis-23
        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();
            }
        }
コード例 #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();
            }
        }
コード例 #3
0
ファイル: StepEventArgs.cs プロジェクト: vtsvang/cis-23
 public StepEventArgs(Directions direction, RandomWalker walker)
 {
     Direction = direction;
     Walker = walker;
 }
コード例 #4
0
 public StepEventArgs(Directions direction, RandomWalker walker)
 {
     Direction = direction;
     Walker    = walker;
 }