Beispiel #1
0
        private void SetRouletteColor(string stringValue, int numberBetValue)
        {
            switch (stringValue)
            {
                case "Red":
                    RouletteColor = RouletteColors.Red;
                    break;
                case "Black":
                    RouletteColor = RouletteColors.Black;
                    break;
                case "Green":
                    RouletteColor = RouletteColors.Green;
                    break;
                case "Zero":
                    RouletteColor = RouletteColors.Green;
                    break;
                case "DoubleZero":
                    RouletteColor = RouletteColors.Green;
                    break;
                case "Number":
                    var numbers = new RouletteNumberList();
                    RouletteColor = numbers.Where(n => n.Value == numberBetValue.ToString()).First().RouletteColor;
                    break;
                default:
                    break;

            }
        }
Beispiel #2
0
 private RouletteNumber RollTheBall()
 {
     var rouletteNumberList = new RouletteNumberList();
     int index = _random.Next(0, rouletteNumberList.Count);
     return rouletteNumberList[index];
 }