public void WhenTellsTheHostToBuy(string playerName, string cardName) { var client = _clients.Single(c => c.PlayerName == playerName); var gameState = _gameHost.GetGameState(client); var pileId = gameState.Bank.Single(p => p.Name == cardName).Id; var message = new BuyCardMessage(client.PlayerId, pileId); _gameHost.AcceptMessage(message); }
public ActionResult BuyCard(Guid id) { var message = new BuyCardMessage(playerId: Client.PlayerId, pileId: id); Client.AcceptMessage(message); return new EmptyResult(); }