// Rework Choose to avoid 'params' and array allocations:
 public static T Choose <T>(this RNG rng, T t0, T t1)
 {
     if (rng.CoinFlip())
     {
         return(t0);
     }
     else
     {
         return(t1);
     }
 }
Пример #2
0
 private bool DecideWhoGoesFirst()
 {
     return(RNG.CoinFlip());
 }
Пример #3
0
 //Use random number generator to determine who should go first
 bool WhoGoesFirst()
 {
     return(RNG.CoinFlip());
 }