public static Card[] GetPlayerCards(int userId, IPlayTableService tableService) { var player = tableService.GettablePlayerOfId(userId); var cards = player?.GetHandCards(); return(cards); }
public static PlayTableStaeModel GetTablePLayerState(int playerId, IPlayTableService playTableService, IMapper mapper) { var tablePlayer = playTableService.GettablePlayerOfId(playerId); if (tablePlayer != null) { var tableState = GetTableState(tablePlayer.TableId, playTableService, mapper); return(tableState); } return(null); }