public void ChooseHand() { var textSelector = new TextSelector() { Caption = string.Join(",", hands.ToList().ConvertAll(hand => hand.ToString()).ToArray()), Items = hands.ToList().ConvertAll(hand => hand.ToString()) }; var result = textSelector.DoSelect(); var number = result.Number; this.ChoosedHand = hands[number]; }
static void Main() { Console.Clear(); var textSelector = new TextSelector() { Caption = "Choose Rule !!", Items = MatchFactory.RuleLists, }; var selected = textSelector.DoSelect(); var match = MatchFactory.Create(selected.Text, 2); for (int i = 0; i < 10; i++) { Console.Clear(); match.Duel(); Console.WriteLine(); Console.WriteLine("Press any key..."); Console.ReadKey(); } }