public ActionResult SelectPile(Guid id) { var message = new ChooseAPileMessage(Client.PlayerId, id); Client.AcceptMessage(message); return(new EmptyResult()); }
public void Respond(IGameClient client, ActivityModel activity, GameViewModel state) { var pile = SelectPile(state, client); TalkSmack(pile, client); IGameActionMessage message = null; if (activity.ParseType() == ActivityType.DoBuys) { message = new BuyCardMessage(client.PlayerId, pile.Id); } else if (activity.ParseType() == ActivityType.SelectPile) { message = new ChooseAPileMessage(client.PlayerId, pile == null ? Guid.Empty : pile.Id); } client.AcceptMessage(message); }
public void Respond(IGameClient client, ActivityModel activity, GameViewModel state) { var pile = SelectPile(state, client); TalkSmack(pile, client); IGameActionMessage message = null; if (activity.ParseType() == ActivityType.DoBuys) { message = new BuyCardMessage(client.PlayerId, pile.Id); } else if (activity.ParseType() == ActivityType.SelectPile) { message = new ChooseAPileMessage(client.PlayerId, pile == null ? Guid.Empty : pile.Id); } client.AcceptMessage(message); }