Belot.Deal.DealCards C# (CSharp) Метод

DealCards() приватный Метод

private DealCards ( int count ) : void
count int
Результат void
        private void DealCards( int count )
        {
            System.Random rand = new Random( DateTime.Now.Millisecond * DateTime.Now.Second );

            Player current = this._firstPlayer;

            for( int i = count; i > 0; i-- )
            {
                int index = rand.Next( i );

                current.Cards.Add( _cards[index] );
                current = this._game.GetNextPlayer( current );

                _cards.RemoveAt( index );
            }

            CardComparer comparer = new CardComparer( this._currentAnnouncement.Type );

            this._game.GetPlayer( PlayerPosition.South ).Cards.Sort( comparer );
            this._game.GetPlayer( PlayerPosition.East ).Cards.Sort( comparer );
            this._game.GetPlayer( PlayerPosition.North ).Cards.Sort( comparer );
            this._game.GetPlayer( PlayerPosition.West ).Cards.Sort( comparer );
        }