Beispiel #1
0
    public void Verification(GameCard data)
    {
        if (_firstGameCard != null && _secondGameCard != null)
        {
            return;
        }
        else if (_firstGameCard == null)
        {
            _firstGameCard = data;
            return;
        }
        else
        {
            if (_firstGameCard.IsOpen())
            {
                _secondGameCard = data;

                if (IsEqual())
                {
                    WinningCombination();
                }
                else
                {
                    LossingCombination();
                }

                _firstGameCard = _secondGameCard = null;
            }
            else
            {
                _firstGameCard = data;
            }
        }
    }