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; } }
private RouletteNumber RollTheBall() { var rouletteNumberList = new RouletteNumberList(); int index = _random.Next(0, rouletteNumberList.Count); return rouletteNumberList[index]; }