Esempio n. 1
0
        static void Main(string[] args)
        {
            RPSGenerator rps = new RPSGenerator();
            Rocky        r   = new Rocky(rps);

            Console.WriteLine("Welcome to Rock Paper Scissors!");
            Console.WriteLine();

            Console.Write("Enter your name: ");
            string yourName = Console.ReadLine();

            Console.WriteLine();

            Console.Write("Would you like to play against Rocky or Bullwinkle (R/B)?: ");
            string oppInput = Console.ReadLine();

            oppInput = rps.opponent(oppInput);

            Console.WriteLine(yourName.ToLower() + " is playing against " + oppInput);

            bool run = true;

            while (run == true)

            {
                Console.Write("Rock, paper, or scissors? (R/P/S):");
                string gameInput = Console.ReadLine();
                gameInput = rps.playGame(gameInput);

                Console.WriteLine("Your selection is " + gameInput.ToLower());


                //Console.WriteLine(r.GenerateRPS());

                run = Continue();
            }
        }
Esempio n. 2
0
 public Bullwinkle(RPSGenerator s) : base(s)
 {
     name = "Bullwinkle";
 }
Esempio n. 3
0
 public Player(RPSGenerator r)
 {
     rpsList = r;
 }
Esempio n. 4
0
 public Rocky(RPSGenerator r) : base(r)
 {
     name = "Rocky";
 }