Beispiel #1
0
 public Card getPrev(Card next)
 {
     if (next.index - 1 < 0)
     {
         currentIndex = lastCard;
         return cards[lastCard];
     }
     else
     {
         currentIndex--;
         return cards[currentIndex];
     }
 }
Beispiel #2
0
 public Card getNext(Card next)
 {
     if (next.index + 1 >= size)
     {
         currentIndex = firstCard;
         return cards[firstCard];
     }
     else
     {
         currentIndex++;
         return cards[currentIndex];
     }
 }
Beispiel #3
0
 public void swap(Card card)
 {
     Card temp = cards[currentIndex];
     cards[currentIndex] = card;
 }