예제 #1
0
파일: Human.cs 프로젝트: Sweetwater/RPSGame
 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];
 }
예제 #2
0
        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();
            }
        }