示例#1
0
        public ActionResult PlayAgain()
        {
            List <RockPaperScissorsGame> allGames    = RockPaperScissorsGame.GetAll();
            RockPaperScissorsGame        currentGame = allGames[0];

            return(View("PlayerOneSelection", currentGame));
        }
示例#2
0
        public ActionResult PlayAgainComputer()
        {
            List <RockPaperScissorsGame> allGames    = RockPaperScissorsGame.GetAll();
            RockPaperScissorsGame        currentGame = allGames[0];

            currentGame.Computery();
            return(View("Computer", currentGame));
        }
示例#3
0
        public ActionResult ComputerResults()
        {
            string PlayerOneSelection                = Request.Form["player-one-selection-computer"];
            List <RockPaperScissorsGame> allGames    = RockPaperScissorsGame.GetAll();
            RockPaperScissorsGame        currentGame = allGames[0];

            currentGame.SetPlayerOneChoice(PlayerOneSelection);
            currentGame.GameResult();
            return(View(currentGame));
        }
示例#4
0
        public ActionResult Results()
        {
            string PlayerTwoSelection                = Request.Form["player-two-selection"];
            List <RockPaperScissorsGame> allGames    = RockPaperScissorsGame.GetAll();
            RockPaperScissorsGame        currentGame = allGames[0];

            currentGame.SetPlayerTwoChoice(PlayerTwoSelection);
            currentGame.GameResult();

            return(View(currentGame));
        }