示例#1
0
 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);
 }
示例#2
0
 public ActionResult BuyCard(Guid id)
 {
     var message = new BuyCardMessage(playerId: Client.PlayerId, pileId: id);
     Client.AcceptMessage(message);
     return new EmptyResult();
 }