Dominion.ListOfCards.SwapCardsInPlace C# (CSharp) Метод

SwapCardsInPlace() публичный Метод

public SwapCardsInPlace ( int position1, int position2 ) : void
position1 int
position2 int
Результат void
        public void SwapCardsInPlace(int position1, int position2)
        {
            int lastIndex = this.cards.Count - 1;
            // the top of deck, or position 0, as at the end of the array.
            position1 = lastIndex - position1;
            position2 = lastIndex - position2;

            Card card1 = this.cards[position1];
            this.cards[position1] = this.cards[position2];
            this.cards[position2] = card1;
        }