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