Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }