Example #1
0
        public async Task <ResponseSurrenderGameView> Surrender(long playerId, long sessionId)
        {
            await _historyManager.Create(playerId,
                                         UserMessages.ChoseToSurrenderMessage, sessionId);

            await _cardManager.ClearPlayerHand(playerId, sessionId);

            await GiveCardsToBots(sessionId);
            await GiveCardsToDealer(sessionId);

            ResponseSurrenderGameView gameView = await _gameViewManager.GetSurrenderGameView(playerId, sessionId);

            await _sessionManager.Close(sessionId);

            return(gameView);
        }