Beispiel #1
0
        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()));
        }
Beispiel #2
0
        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);
        }