Skip navigation links
A C D F G I M P R S T 

A

addCard(Card) - Method in class CardStack
Add the given card to the top of the stack.
allCards - Static variable in class Card
an array of all unique Card objects

C

canPlayFrom() - Method in class CardStack
Returns true if a card may be removed from this stack and otherwise throws an IllegalPlayException ("You cannot play from an empty stack.").
canPlayFrom() - Method in class Deck
Throws IllegalPlayException "That card stack cannot be played from."
canPlayFrom() - Method in class Foundation
Throws IllegalPlayException "That card stack cannot be played from."
Card - Class in <Unnamed>
A class for representing standard (French) playing cards.
Card(int, int) - Constructor for class Card
Constructor to create a card object with the corresponding zero-based indices to rankNames and suitNames, respectively
CardStack - Class in <Unnamed>
CardStack - a superclass of all Card stacks, embodying basic functionality, yet modifiable via class extension.
CardStack() - Constructor for class CardStack
 
Cascade - Class in <Unnamed>
A Cascade is a specialized card stack where a card may be added if if either (1) the stack is empty, or (2) the top card is the next higher rank with differing color.
Cascade() - Constructor for class Cascade
 
Cell - Class in <Unnamed>
A Cell is a specialized card stack where a card may be added if the stack is empty (free).
Cell() - Constructor for class Cell
 

D

Deck - Class in <Unnamed>
A Deck is a specialized card stack that initially has all cards shuffled according to a given random number seed.
Deck(long) - Constructor for class Deck
Create a shuffled deck of cards according to the given random number seed.

F

Foundation - Class in <Unnamed>
A Foundation is a specialized card stack where a card may be added if (1) it is empty and the card is an ace or (2) it is not empty and the card is the same suit as the top card with the next higher rank.
Foundation() - Constructor for class Foundation
 
Freecell - Class in <Unnamed>
Text-based view and controller for Freecell game.
Freecell() - Constructor for class Freecell
 
FreecellGame - Class in <Unnamed>
Model of a Freecell game.
FreecellGame(long) - Constructor for class FreecellGame
Create a Freecell game with a random deal generated with a given seed.

G

getRank() - Method in class Card
Get rank of card (zero-based index to rankNames).
getStack(int) - Method in class FreecellGame
Return an array with the Card in the given stack number listed from bottom to top.
getSuit() - Method in class Card
Get suit of card (zero-based index to suitNames).
getTopCard() - Method in class CardStack
Return the top card (or null if empty).

I

IllegalPlayException - Exception in <Unnamed>
A trivial extension of an Exception with a message for carrying illegal play information.
IllegalPlayException(String) - Constructor for exception IllegalPlayException
Create an IllegalPlayException with the given message.
isEmpty() - Method in class CardStack
Return whether or not the card stack is empty.
isGameOver() - Method in class FreecellGame
Return whether or not the game has been won (that is, all cards are on foundations).

M

main(String[]) - Static method in class Freecell
Start a Freecell game with seed 0.

P

play() - Method in class Freecell
Play a Freecell game with a random shuffle.
play(long) - Method in class Freecell
Play a Freecell game with a random shuffle performed according to a given random seed.
play(int, int) - Method in class FreecellGame
Attempt to move a card from stack srcStackNum to stack destStackNum.
playTo(Card) - Method in class CardStack
Given a card to be played to the top of this card stack, either make the legal play and return true, or ignore the illegal play and throw an appropriate Exception.
playTo(CardStack) - Method in class CardStack
Given a stack from which the top card is to be played to the top of this card stack, either make the legal play and return true, or throw an appropriate IllegalPlayException.
playTo(Card) - Method in class Cascade
Given a card to be played to the top of this card stack, either make the legal play and return true, or throw an appropriate Exception.
playTo(Card) - Method in class Cell
Given a card to be played to the top of this card stack, either make the legal play and return true, or throw an appropriate Exception.
playTo(Card) - Method in class Deck
Throws IllegalPlayException "Illegal stack number.
playTo(Card) - Method in class Foundation
Given a card to be played to the top of this card stack, either make the legal play and return true, or throw an appropriate Exception.

R

rankNames - Static variable in class Card
array of abbreviated card rank names in ascending order of rank
removeTopCard() - Method in class CardStack
Remove the top card and return it (or null if empty).

S

size() - Method in class CardStack
Return the size of the card stack.
stack - Variable in class CardStack
 
suitIsRed - Static variable in class Card
parallel array to suitNames indicating whether or not the corresponding suit is red
suitNames - Static variable in class Card
array of abbreviated card suit names with lowercase red suits

T

toArray() - Method in class CardStack
Return an array of Card objects in this stack, ordered bottom to top.
toString() - Method in class Card
 
toString() - Method in class CardStack
 
toString() - Method in class FreecellGame
 
A C D F G I M P R S T 
Skip navigation links