public ActionResult ContinuarPartida(int id) { Jogador online = Session["online"] as Jogador; if (online == null) { return RedirectToAction("Login"); } Game abertos = Base.Games.Where(j => j.Codigo == id).SingleOrDefault(); sendGame sd = new sendGame(); sd.jogo = abertos; sd.online = online; return View(sd); }
public ActionResult CriaNovaPartida(string nome) { Jogador online = Session["online"] as Jogador; if (online == null) { return RedirectToAction("Login"); } Jogador adversario = dBase.GetByName(nome); Game game = new Game(online.Code, adversario.Code); sendGame sd = new sendGame(); sd.jogo = dBase.IncludeNewGame(game); sd.online = online; return View(sd); }