|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.curre.prefcount.bean.PlayerStatistics
public class PlayerStatistics
Object of this class represents various game scores/data for a player.
Created date: Apr 6, 2007
| Constructor Summary | |
|---|---|
PlayerStatistics(GameResultBean resultBean,
Place playerPlace)
Constructor with a result bean argument. |
|
| Method Summary | |
|---|---|
int |
getFinalMountainInWhists()
Returns the "final" computed mountain value in whists (x10), which is = (averageMountain - (mountain + mountFix - minMountain)) x 10. |
int |
getFinalScoreInWhists()
Returns computed final score (balance) in whists. |
int |
getMinMountain()
Returns the minimum mountain in the game. |
java.lang.Integer |
getMountain()
Getter for the player's mountain. |
java.lang.Integer |
getMountFix()
Getter for property 'mountFix'. |
int |
getNewMountain()
Returns the new computed mountain value according to the current maxPool value and the type of pref (Leningradka or other). |
java.lang.String |
getPlayerName()
Getter for the player's name. |
java.lang.String |
getPlayerNameLetter()
Getter for the first letter of the player's name (returned capitalized). |
Place |
getPlayerPlace()
Gets player's place. |
java.lang.Integer |
getPool()
Getter for the player's pool value. |
java.lang.Integer |
getWhistFixAgainstPlayer(Place place)
Gets whist fix against the given player. |
java.util.Map<Place,java.lang.Integer> |
getWhistFixesMap()
Gets the map that holds whist fixes that this player has against other players (key = player place, value = whist fix). |
java.lang.Integer |
getWhistsAgainstPlayer(Place place)
Returns whist that the current player has against the given player. |
java.lang.Integer |
getWhistSaldoAgainstPlayer(Place place)
Gets whist saldo against the given player. |
java.util.Map<Place,java.lang.Integer> |
getWhistSaldoMap()
Gets the map that holds whist saldo/balances that this player has against other players; the keys in this map are the other players places and the values are the corresponding whist saldo values; total player's whist saldo/balance is stored under the same (as the player's place) key. |
java.lang.String |
getWhistsStringForPlayer(Place place)
Returns whists for the given player (refered by its index); value is returned as a string terminated with a period. |
void |
setMountain(java.lang.Integer mountain)
Setter for the player's mountain. |
void |
setMountainFromField(javax.swing.JTextField field)
Setter for the player's mounatain that is fetched from the passed JTextField argument. |
void |
setMountFix(java.lang.Integer mountFix)
Setter for property 'mountFix'. |
void |
setPlayerName(java.lang.String playerName)
Setter for the player's name. |
void |
setPool(java.lang.Integer pool)
Setter for the player's pool value. |
void |
setPoolFromField(javax.swing.JTextField field)
Setter for the player's pool that is fetched from the passed JTextField argument. |
java.lang.Integer |
setWhistsForPlayerFromField(Place place,
javax.swing.JTextField field)
Setter for the player's whists that this player has against the player refered by its index argument. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PlayerStatistics(GameResultBean resultBean,
Place playerPlace)
resultBean - Reference to the result bean.playerPlace - Player's place.| Method Detail |
|---|
public java.lang.String getPlayerName()
public Place getPlayerPlace()
public java.lang.String getPlayerNameLetter()
public void setPlayerName(java.lang.String playerName)
playerName - Player's name to set.public java.lang.Integer getMountain()
public void setMountain(java.lang.Integer mountain)
mountain - Player's new mountain value.public int getNewMountain()
public int getFinalMountainInWhists()
public void setMountainFromField(javax.swing.JTextField field)
JTextField argument.
field - JTextField to use to fetch the mountain value.public java.lang.Integer getPool()
public void setPool(java.lang.Integer pool)
pool - Player's new pool value.public java.lang.Integer getMountFix()
public void setMountFix(java.lang.Integer mountFix)
mountFix - Value to set for property 'mountFix'.public void setPoolFromField(javax.swing.JTextField field)
JTextField argument.
field - JTextField to use to fetch the pool value.
public java.lang.Integer setWhistsForPlayerFromField(Place place,
javax.swing.JTextField field)
place - Other player's place that this player has whists against.field - JTextField to use to fetch the whists value.
Integer object.public java.lang.Integer getWhistsAgainstPlayer(Place place)
place - Player's place to fetch the whists for.
public java.lang.String getWhistsStringForPlayer(Place place)
place - Player's place to fetch the whists for.
public int getFinalScoreInWhists()
public java.util.Map<Place,java.lang.Integer> getWhistSaldoMap()
public java.lang.Integer getWhistSaldoAgainstPlayer(Place place)
place - other player's place.
public java.util.Map<Place,java.lang.Integer> getWhistFixesMap()
public java.lang.Integer getWhistFixAgainstPlayer(Place place)
place - other player's place.
public int getMinMountain()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||