Example #1
0
        public void PlayerOneRock_PlayerOneWins_False()
        {
            RockPaperScissor newGame = new RockPaperScissor();

            newGame.PlayerOneRock("Paper");
            int POS = newGame.GetPlayerOneScore();

            Assert.AreEqual(POS, 0);
        }
Example #2
0
        public ActionResult GameResult()
        {
            string           POChoice = Request.Form["PlayerOne"];
            string           PTChoice = Request.Form["PlayerTwo"];
            RockPaperScissor newGame  = new RockPaperScissor();

            if (POChoice == "Rock")
            {
                newGame.PlayerOneRock(PTChoice);
            }
            else if (POChoice == "Paper")
            {
                newGame.PlayerOnePaper(PTChoice);
            }
            else if (POChoice == "Scissors")
            {
                newGame.PlayerOneScissor(PTChoice);
            }

            return(View("Index", newGame));
        }