A C D G H I L M N P R S T

A

add(Card) - Method in class Hand
Adds a card to the hand.
append(Card) - Method in class ListOfCards
Appends an object to the end of the list
atEnd() - Method in class ListOfCards
Returns true if we are at the end of the list

C

Card - class Card.
The Card class represents a card in our game.
Card() - Constructor for class Card
Constructs a Card with base rank and suit.
clear() - Method in class Hand
Empties the hand.

D

Deck - class Deck.
In order to have a card game at all, we must have the Deck class, which you must complete according to the API below.
Deck() - Constructor for class Deck
Creates a non-shuffled 52-card deck
delete() - Method in class ListOfCards
Deletes the current item

G

genNextRank() - Method in class Card
Generates a card with the next rank.
genNextSuit() - Method in class Card
Generates a card with the next suit.
genPrevRank() - Method in class Card
Generates a card with the previous rank.
genPrevSuit() - Method in class Card
Generates a card with the previous suit.
getBottom() - Method in class Deck
Returns (does not delete) the bottom card in the deck.
getCard(int) - Method in class Hand
Returns the nth card in the hand.
getDrawingPane() - Method in class Hand
Returns the drawing pane on which the hand is drawing its cards
getItem() - Method in class ListOfCards
Returns the Object held by the current node
getNthFromTop(int) - Method in class Deck
Returns the Nth card from the top of the deck.
getPicture() - Method in class Card
Returns the PictureComponent holding the card's image.
getSize() - Method in class Hand
Returns the number of cards in the hand
getTop() - Method in class Deck
Equivalent to peek.

H

Hand - class Hand.
Represents a hand in a card game.
Hand() - Constructor for class Hand
Creates a new empty hand and a drawing pane to draw on.

I

init() - Method in class Lab7
 
insert(Card) - Method in class ListOfCards
Inserts n just before current item; n becomes current.
isAlternateSuitOf(Card) - Method in class Card
Returns true if other and this are cards of a different color.
isEmpty() - Method in class Hand
Returns whether the hand is empty or not
isEmpty() - Method in class ListOfCards
Checks whether the list is empty; returns true if so.
isEmpty() - Method in class StackOfCards
Returns true if the stack is empty, false otherwise.
isRankPrevOf(Card) - Method in class Card
Returns whether or not this card is the previous rank of the other card.
isRankSuccOf(Card) - Method in class Card
Returns whether or not this card is the successor rank of the other card.
isVisible() - Method in class Card
Returns whether the card is face up (true) or down (false)
isVisible() - Method in class Hand
Returns the visibility of the cards in the hand.

L

Lab7 - class Lab7.
 
Lab7() - Constructor for class Lab7
 
ListOfCards - class ListOfCards.
This is a linked list of objects.

M

main(String[]) - Static method in class Lab7
 

N

next() - Method in class ListOfCards
Goes on to the next node

P

peek() - Method in class StackOfCards
Reveals the card at the top of the stack but does not pop it.
perfectShuffle() - Method in class Deck
Performs one pass of the Perfect Shuffle algorithm.
pop() - Method in class Deck
Pops a card from the top of the deck
pop() - Method in class StackOfCards
Pops a card from the top of the stack
prepend(Card) - Method in class ListOfCards
Prepends an object to the beginning of the list.
push(Card) - Method in class Deck
Adds a Card to the top of the deck
push(Card) - Method in class StackOfCards
Adds a Card to the top of the stack

R

rankDiff(Card) - Method in class Card
Returns the difference in rank.
rankToString() - Method in class Card
Returns the rank as a string, for example "Ace"
remove(Card) - Method in class Hand
Removes a card from the hand.
remove(int) - Method in class Hand
Removes the nth card from the hand.
removeBottom() - Method in class Deck
Removes from the deck and returns the bottom card.
removeNthFromTop(int) - Method in class Deck
Removes from the deck and returns the nth card from the top.
removeTop() - Method in class Deck
Removes from the deck and returns the top card.
reset() - Method in class ListOfCards
Returns to the beginning of the list

S

sameRankAs(Card) - Method in class Card
Returns true if the rank of the cards is the same
sameSuitAs(Card) - Method in class Card
Returns true if the suit of the cards is the same
selectionShuffle() - Method in class Deck
Performs one pass of the "Selection Shuffle" algorithm.
setItem(Card) - Method in class ListOfCards
Overwrites the current item.
setVisible(boolean) - Method in class Card
Sets the visibility of the Card according to the parameter.
setVisible(boolean) - Method in class Hand
Sets the visibility of the cards in the hand.
sort() - Method in class Hand
Sorts the hand by rank.
StackOfCards - class StackOfCards.
The StackOfCards is a simple class, but is really the lifeblood of this lab.
StackOfCards() - Constructor for class StackOfCards
Creates an empty stack of cards.
Startup - class Startup.
 
Startup() - Constructor for class Startup
 
suitDiff(Card) - Method in class Card
Returns the difference in suit.
suitToString() - Method in class Card
Returns the suit as a string, for example "Spades"

T

toString() - Method in class Card
Returns a string such as "Ace of Spades" that reflects the rank and suit of a card.
toString() - Method in class Hand
Returns a string containing all the cards in the hand.
toString() - Method in class ListOfCards
Prints out the list
toString() - Method in class StackOfCards
Prints out all the cards in the order they are held in the stack The most recently pushed cards appear first.

A C D G H I L M N P R S T
by Sergey Klibanov and Nate Bayless