Beispiel #1
0
        private void MainMenu()
        {
            do
            {
                Console.Clear();
                //                                  10        20        30        40
                //                        0123456789012345678901234567890123456789012
                Console.WriteLine(/*00*/ $"┌─────────────────────────────────────────┐");
                Console.WriteLine(/*01*/ $"│            3 en raya (Michi)            │");
                Console.WriteLine(/*02*/ $"├─────────────────────────────────────────┤");
                Console.WriteLine(/*03*/ $"│                                         │");
                Console.WriteLine(/*04*/ $"│   (1) - Start game                      │");
                Console.WriteLine(/*05*/ $"│   (2) - Set Difficulty ({difficulty.ToString()})".PadRight(42, ' ') + "│");
                Console.WriteLine(/*06*/ $"│   (3) - Set Type ({typeGame.ToString()}) ".PadRight(42, ' ') + "│");
                Console.WriteLine(/*07*/ $"│   (0) - Exit                            │");
                Console.WriteLine(/*08*/ $"│                                         │");
                Console.WriteLine(/*09*/ $"├─────────────────────────────────────────┤");
                Console.WriteLine(/*10*/ $"│   Choose your option :                  │");
                Console.WriteLine(/*11*/ $"└─────────────────────────────────────────┘");
                Console.SetCursorPosition(25, 10);
                string opt = Console.ReadLine();

                switch (opt)
                {
                case "0":
                    exit = true;
                    break;

                case "1":
                    Console.Clear();
                    Play();
                    break;

                case "2":
                    DifficultyMenu();
                    break;

                case "3":
                    TypeGameMenu();
                    break;

                default:
                    break;
                }
            } while (!exit);
        }
Beispiel #2
0
 public override string GetInfo()
 {
     return(base.GetInfo() + $"Type of game:{Game.ToString()};");
 }