Пример #1
0
 public ActionResult PlayGame(PlayGameVM playGame)
 {
     if (ModelState.IsValid)
     {
         if (WordBank.NewWord(playGame.Word, playGame.GameID))
         {
             Game.AddWord(playGame, (int)Session["ID"]);
             return(RedirectToAction("PlayGame", "Game", new { area = "" }));
         }
         else
         {
             Game.WinLoss(playGame, (int)Session["ID"]);
             return(RedirectToAction("PlayGame", "Game", new { area = "" }));
         }
     }
     else
     {
         return(View("PlayGame"));
     }
 }