EnterBiddingState() 개인적인 메소드

private EnterBiddingState ( ) : Player
리턴 Player
예제 #1
0
        private void NextDeal()
        {
            _southPlayer.Cards.Clear();
            _eastPlayer.Cards.Clear();
            _northPlayer.Cards.Clear();
            _westPlayer.Cards.Clear();

            _currentDeal = new Deal(this, _firstPlayer);

            _firstPlayer = GetNextPlayer(_firstPlayer);
            _deals.Add(_currentDeal);
            _currentDeal.DealFirstCards();

            Player winner = _currentDeal.EnterBiddingState();

            if (_currentDeal.CurrentAnnouncement.Type == AnnouncementTypeEnum.Pass)
            {
                _southPlayer.Cards.Clear();
                _eastPlayer.Cards.Clear();
                _northPlayer.Cards.Clear();
                _westPlayer.Cards.Clear();
                FinalizeDeal();
                return;
            }

            RaiseBiddingCompleted(winner, _currentDeal.CurrentAnnouncement);

            _currentDeal.DealRestCards();

            _southPlayer.CardPlayed += new Player.CardPlayedHandler(_currentDeal.PlayerPlayedCard);
            _northPlayer.CardPlayed += new Player.CardPlayedHandler(_currentDeal.PlayerPlayedCard);
            _eastPlayer.CardPlayed  += new Player.CardPlayedHandler(_currentDeal.PlayerPlayedCard);
            _westPlayer.CardPlayed  += new Player.CardPlayedHandler(_currentDeal.PlayerPlayedCard);

            _currentDeal.EnterPlayingState();
        }
예제 #2
0
        private void NextDeal()
        {
            _southPlayer.Cards.Clear();
            _eastPlayer.Cards.Clear();
            _northPlayer.Cards.Clear();
            _westPlayer.Cards.Clear();

            _currentDeal = new Deal( this, _firstPlayer );

            _firstPlayer = GetNextPlayer( _firstPlayer );
            _deals.Add( _currentDeal );
            _currentDeal.DealFirstCards();

            Player winner = _currentDeal.EnterBiddingState();
            if( _currentDeal.CurrentAnnouncement.Type == AnnouncementTypeEnum.Pass )
            {
                _southPlayer.Cards.Clear();
                _eastPlayer.Cards.Clear();
                _northPlayer.Cards.Clear();
                _westPlayer.Cards.Clear();
                FinalizeDeal();
                return;
            }

            RaiseBiddingCompleted( winner, _currentDeal.CurrentAnnouncement );

            _currentDeal.DealRestCards();

            _southPlayer.CardPlayed += new Player.CardPlayedHandler( _currentDeal.PlayerPlayedCard );
            _northPlayer.CardPlayed += new Player.CardPlayedHandler( _currentDeal.PlayerPlayedCard );
            _eastPlayer.CardPlayed += new Player.CardPlayedHandler( _currentDeal.PlayerPlayedCard );
            _westPlayer.CardPlayed += new Player.CardPlayedHandler( _currentDeal.PlayerPlayedCard );

            _currentDeal.EnterPlayingState();
        }