|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Solitaire | +--brlandry.GrandfatherClock
Grandfather's Clock:
This game requires a 1024x768 monitor
Foundations (12 piles: the "Clock". Complete these piles to win the game)
Base Cards
12: 9 clubs
1: 10 hearts
2: Jack spades
3: Queen diamonds
4: King clubs
5: 2 hearts
6: 3 spades
7: 4 diamonds
8: 5 clubs
9: 6 hearts
10: 7 spades
11: 8 diamonds
Build up in suit from the base card until the top card of each foundation shows the number corresponding to its position on a clock face (the "hour" in a clock in that position). For example, the 3 of spades at the bottom would build up to the 6 of spades (6 o'clock).
Jack equals 11 o'clock and Queen equals 12 o'clock.
Ranking of cards is continuous: build Aces after Kings when necessary.
All the piles will require 3 cards, except the Ten, Jack, Queen and King, which will require 4 cards each.
Tableau (8 columns of 5 cards each)
Randomly dealt from remaining cards.
Build down regardless of suit (for example, a 5 can be played on any 6).
The top card of each pile is available for play to another tableau pile or to the foundations.
Only one card at a time can be moved.
Spaces may be filled with any available card.
Field Summary | |
protected Column[] |
columns
|
static int |
columnToColumn
Contant used to identify moves |
static int |
columnToPile
Constant used to identify moves |
protected ColumnView[] |
cv
|
protected GrandfatherDeck |
gDeck
|
protected Pile[] |
piles
|
protected PileView[] |
pv
|
protected IntegerView |
scoreView
|
protected java.lang.String |
version
Version |
Constructor Summary | |
GrandfatherClock()
|
Method Summary | |
java.util.Enumeration |
availableMoves()
Required to implement SolvableSolitaire. |
java.lang.String |
getName()
Returns name of game |
java.awt.Dimension |
getPreferredSize()
Overrides function from Solitaire to initialize the screen to a larger size. |
java.lang.String |
getVersion()
Returns version |
boolean |
hasWon()
Examines the score to determine if player has won |
void |
initialize()
Initializes games: creates entity, boundary, and view objects. |
protected void |
initializeControllers()
Initialize boundary objects |
protected void |
initializeModel(int seed)
Initializes entity objects |
protected void |
initializeView()
Initializes view objects |
protected static int |
randomNumber(int max)
A function that generates random integers 0<=x |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected GrandfatherDeck gDeck
protected Column[] columns
protected Pile[] piles
protected ColumnView[] cv
protected PileView[] pv
protected IntegerView scoreView
public static final int columnToPile
public static final int columnToColumn
protected java.lang.String version
Constructor Detail |
public GrandfatherClock()
Method Detail |
public void initialize()
protected void initializeModel(int seed)
protected void initializeView()
protected void initializeControllers()
public boolean hasWon()
public java.lang.String getName()
public java.lang.String getVersion()
public java.awt.Dimension getPreferredSize()
public java.util.Enumeration availableMoves()
protected static int randomNumber(int max)
max
- int the maximum value for the random integer
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |