Esempio n. 1
0
        public static void PlayGame(ref int wins, ref int losses, Human UserName, ref Player Opponent)
        {
            while (true)
            {
                Roshambo Input = UserName.generateRoshambo(new Roshambo());
                Roshambo AI    = Opponent.generateRoshambo(Input);

                if (Opponent.Name == "Dr. K")
                {
                    Counter(ref wins, ref losses, UserName, Opponent, Input, AI);
                }
                if (Opponent.Name == "Grant Chirpus")
                {
                    Counter(ref wins, ref losses, UserName, Opponent, Input, AI);
                }
                if (Opponent.Name == "Hulk Hogan")
                {
                    Counter(ref wins, ref losses, UserName, Opponent, Input, AI);
                }

                if (Validate.Continue() == true)
                {
                    if (Validate.NewOpponent() == true)
                    {
                        Opponent = RoshamboApp.ChooseOpponent();
                    }
                    Console.Clear();
                }
                else
                {
                    break;
                }
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            int wins   = 0;
            int losses = 0;

            Console.WriteLine("Hey there! What's your name?");
            Human UserName = new Human(Console.ReadLine());

            Player Opponent = RoshamboApp.ChooseOpponent();

            PlayGame(ref wins, ref losses, UserName, ref Opponent);
            Console.WriteLine($"You won {wins} and lost {losses}");
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to Rock Paper Scissors!");
            RoshamboApp letsPlay = new RoshamboApp();
            bool        doAgain  = true;

            while (doAgain == true)
            {
                Console.WriteLine("Would you like to play against Dwayne Johnson or John Cena?");
                string selectPlayer = Console.ReadLine();
                selectPlayer.ToLower();
                Console.WriteLine(letsPlay.AskPlay());
                letsPlay.PlayerSelection(selectPlayer);
                doAgain = Continue();
            }
        }
Esempio n. 4
0
 static void Main(string[] args)
 {
     RoshamboApp.StartTheGame();
 }
Esempio n. 5
0
 static void Main(string[] args)
 {
     RoshamboApp.Play();
     RoshamboApp.PrintResults();
 }