public ActionResult SubmitComms(CommsFormModel model) { var theGame = Game.GetGame(model.GameId); var player = theGame.GetPlayer(model.ActorId); var comms = new CommsEvent(player, model.CommsType, false, theGame.GetPlayer(model.WhomId), theGame.GetPlayer(model.WhereId)); theGame.Hub.AnnounceComms(theGame, comms); return(Content(null)); }
public ActionResult CommsForm(string gameId, string pid) { var theGame = Game.GetGame(gameId); var player = theGame.GetPlayer(pid); if (player.IsDead) { return(Content("")); } var model = new CommsFormModel() { GameId = gameId, ActorId = player.Id, OtherPlayers = theGame.MobilePlayers.Exclude(pid).ToSelectList(), }; return(PartialView("_CommsActions", model)); }