Exemple #1
0
        static void Main()
        {
            Console.WriteLine("Which Game Would you like to play? (Pick a number)");
            string[] games =
            {
                "1.Simone Says",
                "2.Suspend Person",
            };
            foreach (string game in games)
            {
                Console.WriteLine("{0,-20}", game);
            }

            string userInput = Console.ReadLine();

            switch (userInput)
            {
            case "1":
                SimoneSays.Play();
                break;

            case "2":
                SuspendPerson.Play();
                break;

            default:
                Console.WriteLine("You didn't choose a correct number...");
                Main();
                break;
            }
        }
Exemple #2
0
        public static void Main()
        {
            List <String> games = new List <string>()
            {
                "SimoneSays",
                "SuspendPerson"
            };

            Console.Clear();
            Console.WriteLine("Select Game you want to play:");
            for (int i = 0; i < games.Count; i++)
            {
                Console.WriteLine($"{i + 1}.{games[i]}");
            }

            Console.WriteLine($"Enter Choice(1-{games.Count}) or -1 to quit");
            int op = Convert.ToInt32(Console.ReadLine());

            if (op == 1)
            {
                var game = new SimoneSays();
                game.Play();
            }
            else if (op == 2)
            {
                Console.WriteLine("You have selected the SuspendPerson game");
                Console.WriteLine("Please enter a list of words(separated by ,) to be used as the guess word bank");
                String input = Console.ReadLine();
                var    game  = new SuspendPerson();
                game.Play(input.Split(','));
            }
            else if (op == -1)
            {
                Console.WriteLine("thanks for playing!");
            }
        }
        static void Main(string[] args)
        {
            var mySpinner = new Loader();

            Console.Clear();
            Console.WriteLine("Select your game choices: \n1)JimsV \n2)NorthCodersV ");
            string selectedGameType = Console.ReadLine();

            // <----- For all the my written games -------

            if (selectedGameType == "1")
            {
                Console.Clear();
                Console.WriteLine("Jims Version of the games");
                mySpinner.SimplePercentageLoader();

                Console.Clear();
                Console.WriteLine("Select your game:");
                Console.WriteLine("1) SimonSays \n2) SuspensionMan"); // add in list of games here
                string selectedGame = Console.ReadLine();

                if (selectedGame == "1")
                {
                    Console.WriteLine("Simon picked");
                    var myGame = new SimonSays();
                    myGame.Play(args);
                }

                if (selectedGame == "2")
                {
                    var myGame = new SuspensionManJims();
                    myGame.Play();
                }
            }

            // <----- For all the northCoder written games -------

            if (selectedGameType == "2")
            {
                Console.Clear();
                Console.WriteLine("NorthCoders Version of the games");
                mySpinner.SimplePercentageLoader();

                Console.Clear();
                Console.WriteLine("Select your game:");
                Console.WriteLine("1) SimoneSays \n2) SuspensionMan"); // add in list of games here
                string selectedGame = Console.ReadLine();

                if (selectedGame == "1")
                {
                    var myGame = new SimoneSays();
                    myGame.Play();
                }

                if (selectedGame == "2")
                {
                    string[]      words    = Console.ReadLine().Split(' ');
                    List <string> wordList = new List <string>();
                    foreach (string word in words)
                    {
                        wordList.Add(word);
                    }
                    var myGame = new SuspendPersonNC();
                    myGame.Play(wordList);
                }
            }
        }