Beispiel #1
0
        public Roulette()
        {
            _fields = new List<Field>
                          {
                              new Field(0, Field.Green),
                              new Field(1, Field.Red),
                              new Field(2, Field.Black),
                              new Field(3, Field.Red),
                              new Field(4, Field.Black),
                              new Field(5, Field.Red),
                              new Field(6, Field.Black),
                              new Field(7, Field.Red),
                              new Field(8, Field.Black),
                              new Field(9, Field.Red),
                              new Field(10, Field.Black),
                              new Field(11, Field.Black),
                              new Field(12, Field.Red),
                              new Field(13, Field.Black),
                              new Field(14, Field.Red),
                              new Field(15, Field.Black),
                              new Field(16, Field.Red),
                              new Field(17, Field.Black),
                              new Field(18, Field.Red),
                              new Field(19, Field.Red),
                              new Field(20, Field.Black),
                              new Field(21, Field.Red),
                              new Field(22, Field.Black),
                              new Field(23, Field.Red),
                              new Field(24, Field.Black),
                              new Field(25, Field.Red),
                              new Field(26, Field.Black),
                              new Field(27, Field.Red),
                              new Field(28, Field.Black),
                              new Field(29, Field.Black),
                              new Field(30, Field.Red),
                              new Field(31, Field.Black),
                              new Field(32, Field.Red),
                              new Field(33, Field.Black),
                              new Field(34, Field.Red),
                              new Field(35, Field.Black),
                              new Field(36, Field.Red)
                          };

            _result = _fields[0];
        }
Beispiel #2
0
 public override uint WonAmount(Field f)
 {
     if (f.Color == color)
         return 2 * Amount;
     else
         return 0;
 }
Beispiel #3
0
 public abstract uint WonAmount(Field f);
Beispiel #4
0
 public override uint WonAmount(Field f)
 {
     if (f.Number == fieldNumber)
         return 36 * Amount;
     else
         return 0;
 }
Beispiel #5
0
 public override uint WonAmount(Field f)
 {
     if (f.Even == even)
         return 2 * Amount;
     else
         return 0;
 }
Beispiel #6
0
 public void Spin()
 {
     var n = new Random().Next(0, 37);
     _result = _fields[n];
 }