|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectks.domain.Status
Encapsulates the status of a game as it is being played.
Also maintains numerous statistics about the way in which the game was played. There are two forms of statistics. Incrementable and Settable. Increment: numLosses, numWins, numNewHands, numResetHands, numUndoRequests Settable: numCardsLeft, score
The most important statistics from the end-game are: numWins, score, and numUndoRequests since these will be used to determine the winner.
Creation date: (10/11/01 9:41:23 PM)
Constructor Summary | |
Status()
Status constructor comment. |
|
Status(java.lang.String user,
int numHandsWon,
int overallScore)
Status constructor comment. |
Method Summary | |
int |
getBestScore()
Returns best score of the current hand (current score plus best so far). |
int |
getCurrentScore()
Returns score of the current hand (across multiple games). |
int |
getNewHands()
Return number of times user requested a new hand. |
int |
getNumCardsLeft()
Returns the number of cards left. |
int |
getNumLosses()
Returns the number of times the player has lost on this table. |
int |
getNumResetHands()
Returns the number of times the user has chosen to reset the deck. |
int |
getNumUndoRequests()
Returns number of times user requested an undo. |
int |
getNumWins()
Returns number of times user has won during this table. |
int |
getScore()
Returns score of table (in current hand). |
java.lang.String |
getUser()
Returns the user associated with this Status. |
void |
incrementNumLosses()
Increment the number of losses sustained on this table. |
void |
incrementNumNewHands()
Increment number of times user selected a new hand. |
void |
incrementNumResetHands()
Increment the number of times user has reset hand. |
void |
incrementNumWins()
Increment the number of wins. |
void |
incrementUndoRequests()
Increase the number of undo requests. |
java.lang.String |
playerRankings()
Output relevant data useful for updating player rankings (user:numWins:overallScore) Creation date: (10/22/01 10:06:26 PM) |
void |
setCurrentScore(int newCurrentScore)
Set the current score. |
void |
setNumCardsLeft(int newNumCardsLeft)
Sets the number of cards left. |
void |
setUser(java.lang.String user)
Sets the name of the user associated with these statistics. |
void |
updateCurrentScore()
Updating the current score tallies the points into the overall score and resets to zero to avoid multiple calls from affecting the score more than once. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Status()
public Status(java.lang.String user, int numHandsWon, int overallScore)
Method Detail |
public int getBestScore()
public int getCurrentScore()
public int getNewHands()
public int getNumCardsLeft()
public int getNumLosses()
public int getNumResetHands()
public int getNumUndoRequests()
public int getNumWins()
public int getScore()
public java.lang.String getUser()
public void incrementNumLosses()
public void incrementNumNewHands()
public void incrementNumResetHands()
public void incrementNumWins()
public void incrementUndoRequests()
public java.lang.String playerRankings()
public void setCurrentScore(int newCurrentScore)
newCurrentScore
- intpublic void setNumCardsLeft(int newNumCardsLeft)
newNumCardsLeft
- intpublic void setUser(java.lang.String user)
user
- java.lang.Stringpublic void updateCurrentScore()
Creation date: (10/11/01 9:48:17 PM)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |