public void WhenTellsTheHostToPlay(string playerName, string cardName)
 {
     var client = _clients.Single(c => c.PlayerName == playerName);
     var gameState = _gameHost.GetGameState(client);
     var cardId = gameState.Hand.Single(p => p.Name == cardName).Id;
     var message = new PlayCardMessage(client.PlayerId, cardId);
     _gameHost.AcceptMessage(message);
 }
Beispiel #2
0
 public ActionResult PlayCard(Guid id)
 {
     var message = new PlayCardMessage(playerId: Client.PlayerId, cardId: id);
     Client.AcceptMessage(message);            
     return new EmptyResult();
 }