예제 #1
0
        /// 100 procent chance of poisoning.
        new public bool PoisonAttempt(Virus virus)
        {
            var rnd    = new Random();
            var chance = rnd.NextDouble();

            return(chance > virus.Poison(this.Name));
        }
예제 #2
0
        /// Gives provided virus os name and virus returns chance of the poisoning.
        /// Returns true if os got poisoned.
        public bool PoisonAttempt(Virus virus)
        {
            var rnd    = RandomSingleton.Instance();
            var chance = rnd.NextDouble();

            return(chance > virus.Poison(this.Name));
        }
예제 #3
0
 /// Gives provided virus os name and virus returns chance of the poisoning.
 /// Returns true if os got poisoned.
 public bool PoisonAttempt(Virus virus)
 {
     var rnd = RandomSingleton.Instance();
     var chance = rnd.NextDouble();
     return chance > virus.Poison(this.Name);
 }
예제 #4
0
 /// 100 procent chance of poisoning.
 public new bool PoisonAttempt(Virus virus)
 {
     var rnd = new Random();
     var chance = rnd.NextDouble();
     return chance > virus.Poison(this.Name);
 }