Example #1
0
        public override Gesture GetGesture(string inputGesture)
        {
            switch (inputGesture)
            {
            case "rock":
                playerGesture = new Rock();
                return(playerGesture);

            case "paper":
                playerGesture = new Paper();
                return(playerGesture);

            case "scissors":
                playerGesture = new Scissors();
                return(playerGesture);

            case "lizard":
                playerGesture = new Lizard();
                return(playerGesture);

            case "spock":
                playerGesture = new Spock();
                return(playerGesture);
            }
            return(playerGesture);
        }
Example #2
0
        public override Gesture GetGesture(string inputGesture)
        {
            switch (inputGesture)
            {
            case "rock":
                playerGesture = new Rock();
                return(playerGesture);

            case "paper":
                playerGesture = new Paper();
                return(playerGesture);

            case "scissors":
                playerGesture = new Scissors();
                return(playerGesture);

            case "lizard":
                playerGesture = new Lizard();
                return(playerGesture);

            case "spock":
                playerGesture = new Spock();
                return(playerGesture);

            default:
                Console.WriteLine("Invalid Entry");
                return(TakeTurn());
            }
        }