public void Hit(bool isPlayer) { //player hit the card if (isPlayer) { _player.PushCard(_deck.Pop()); _player.ShowCardFace(_player.GetTotalCards() - 1, false); _player.Flip(_player.GetTotalCards() - 1); _gameUIManager.SetPlayerHandCardValue(_player.GetFaceUpCardValue()); //when player get over 21, player always lost the game. if (_player.GetFaceUpCardValue() > 21) { ShowResult(); } } else { _dealer.PushCard(_deck.Pop()); _dealer.ShowCardFace(_dealer.GetTotalCards() - 1, false); _dealer.Flip(_dealer.GetTotalCards() - 1); _gameUIManager.SetDealerHandCardValue(_dealer.GetFaceUpCardValue()); } }