public ActionResult <Schotten2Response> PlayCard(string matchId, int sectionIndex, int handIndex) { var playerId = User.FindFirst(ClaimTypes.NameIdentifier).Value; var game = _service.PlayCard(matchId, playerId, sectionIndex, handIndex); return(_service.MapResponse(game, playerId.ToString())); }
public void PlayCard(int sectionIndex, int handIndex) { var playerId = GetPlayerId(); var matchId = GetMatchId(); var game = _service.PlayCard(matchId, playerId, sectionIndex, handIndex); SendState(game); game = _service.CompleteTurn(matchId, playerId, sectionIndex, handIndex); SendState(game); }