private void RefreshBoard(decimal[] equities, Street street)
        {
            foreach (ReplayerTableState replayerTableState in TableStateList.Where(st => st.CurrentStreet == street))
            {
                try
                {
                    _playerInState = PlayersCollection.FirstOrDefault(u => u.Name == replayerTableState.CurrentAction.PlayerName);
                    if (_playerInState != null &&
                        ActivePlayerHasHoleCard.FirstOrDefault(x => x.PlayerName == replayerTableState.CurrentAction.PlayerName) != null &&
                        replayerTableState.CurrentAction != null &&
                        ActivePlayerHasHoleCard.Count > 1)
                    {
                        replayerTableState.ActivePlayer.EquityWin = equities[ActivePlayerHasHoleCard.IndexOf(ActivePlayerHasHoleCard.FirstOrDefault(x => x.PlayerName == replayerTableState.CurrentAction.PlayerName))];
                    }
                    else
                    {
                        replayerTableState.ActivePlayer.EquityWin = -1;
                    }


                    ReplayerPlayerViewModel.CopyEquityWin(replayerTableState.ActivePlayer, _playerInState);
                }
                catch (Exception ex)
                {
                    LogProvider.Log.Error(typeof(Converter), $"Player with name '{replayerTableState.CurrentAction.PlayerName}' has not been found in PlayerCollection in method RefreshBoard in ReplayerViewModel class", ex);
                }
            }
        }
        private ReplayerPlayerViewModel GetActivePlayerForState(ReplayerTableState state)
        {
            if (state.ActivePlayer == null)
            {
                return(null);
            }

            var activePlayer = PlayersCollection.FirstOrDefault(x => x.Name == state.ActivePlayer.Name);

            if (activePlayer != null)
            {
                ReplayerPlayerViewModel.Copy(state.ActivePlayer, activePlayer);
            }

            return(activePlayer);
        }
        private void ResetLastActivePlayer(bool resetChipsToPreviousState = false)
        {
            var prevActive = PlayersCollection.FirstOrDefault(x => x.IsActive);

            if (prevActive != null)
            {
                prevActive.IsActive     = false;
                prevActive.ActionString = string.Empty;

                if (resetChipsToPreviousState)
                {
                    prevActive.Bank         = prevActive.OldBank;
                    prevActive.ActiveAmount = prevActive.OldAmount;
                    prevActive.UpdateChips();
                    prevActive.IsFinished = false;
                }
            }
        }