コード例 #1
0
 private void MaybeChangeDirection()
 {
     if (SealedRandom.NextDouble() < 0.25)
     {
         _currentTarget = SealedRandom.Next(0, 4);
     }
 }
コード例 #2
0
        public override void ResetIteration()
        {
            var x = SealedRandom.Next(0, 2) == 0 ? SealedRandom.NextDouble() : -SealedRandom.NextDouble();
            var y = SealedRandom.Next(0, 2) == 0 ? SealedRandom.NextDouble() : -SealedRandom.NextDouble();

            _currentTarget = SealedRandom.Next(0, 4);
            _agentPosition = new Tuple <double, double>(x, y);
            _step          = 1;
            _currentScore  = 0;
        }