net.curre.prefcount.bean
Class GameResultBean

java.lang.Object
  extended by net.curre.prefcount.bean.GameResultBean

public class GameResultBean
extends java.lang.Object

Object of this class represents a bean that holds all score and results for a preferance card game.

Created date: Apr 9, 2007

Author:
Yevgeny Nyden

Constructor Summary
GameResultBean()
          Default ctor.
 
Method Summary
 void clearResults()
          Clears state associated with a game session.
 java.lang.Float getAverageMountain()
          Getter for the player's average mountain.
 Place getDivisibleByNPlayer()
          Getter for property 'divisibleByNPlayer' - player used for the divisible by N adjustments.
 java.lang.Integer getMaxPool()
          Getter for the max pool value.
 java.lang.Integer getMinMountain()
          Returns the minimum mountain in the game.
 int getNumberOfPlayers()
          Returns the number of players in the game.
 java.util.Map<Place,PlayerStatistics> getPlayerStats()
          Getter for the map of player statistics.
 boolean isFinalScoresReady()
          Getter for the flag that indicates that the player final scores are ready for display.
 boolean isLeningradka()
          Getter for the Leningradka pref type flag.
 boolean isMountDivisibleByN()
          Getter for property 'mountNotDivisible'.
 void setAverageMountain(java.lang.Float averageMountain)
          Setter for the player's average mountain.
 void setDivisibleByNPlayer(Place divisibleByNPlayer)
          Setter for divisibleByNPlayer.
 void setFinalScoresReady()
          Sets the flag that indicates that the player final scores are ready for display to true.
 void setLeningradka(boolean leningradka)
          Setter for property 'leningradka'.
 void setMinMountain(java.lang.Integer minMountain)
          Setter for the minimum mountain in the game.
 void setMountDivisibleByN(boolean mountDivisibleByN)
          Setter for the mount divisibility flag.
 void setPlayerStats(java.util.Map<Place,PlayerStatistics> playerStats)
          Setter for the player statistics map.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GameResultBean

public GameResultBean()
Default ctor.

Method Detail

isFinalScoresReady

public boolean isFinalScoresReady()
Getter for the flag that indicates that the player final scores are ready for display.

Returns:
True if all the player final scores have been generated; false otherwise.

setFinalScoresReady

public void setFinalScoresReady()
Sets the flag that indicates that the player final scores are ready for display to true.


getMaxPool

public java.lang.Integer getMaxPool()
Getter for the max pool value.

Returns:
The max pool.

getAverageMountain

public java.lang.Float getAverageMountain()
Getter for the player's average mountain.

Returns:
The player's average mountain.

setAverageMountain

public void setAverageMountain(java.lang.Float averageMountain)
Setter for the player's average mountain. This method will round the float number to the 2 digit after the decimal.

Parameters:
averageMountain - Player's average mountain to set.

getMinMountain

public java.lang.Integer getMinMountain()
Returns the minimum mountain in the game.

Returns:
the minimum mountain in the game.

setMinMountain

public void setMinMountain(java.lang.Integer minMountain)
Setter for the minimum mountain in the game.

Parameters:
minMountain - Min mountain in the game to set.

isLeningradka

public boolean isLeningradka()
Getter for the Leningradka pref type flag. This value matters for the pool/mount ratio value. When this flag is true 1 pool = 2 mount points, when it is false 1 pool = 1 mount.

Returns:
true when the pref type is Leningradka; false otherwise.

setLeningradka

public void setLeningradka(boolean leningradka)
Setter for property 'leningradka'. This value matters for the pool/mount ratio value. When this flag is true 1 pool = 2 mount points, when it is false 1 pool = 1 mount.

Parameters:
leningradka - Value to set for property 'leningradka'.

isMountDivisibleByN

public boolean isMountDivisibleByN()
Getter for property 'mountNotDivisible'.

Returns:
true if mount divisibility does not matter; false - assumes divisible by N (number of players).

setMountDivisibleByN

public void setMountDivisibleByN(boolean mountDivisibleByN)
Setter for the mount divisibility flag.

Parameters:
mountDivisibleByN - true if divisibility does not matter; false - divisible by N (players number).

getPlayerStats

public java.util.Map<Place,PlayerStatistics> getPlayerStats()
Getter for the map of player statistics.

Returns:
Map of player statistics.

setPlayerStats

public void setPlayerStats(java.util.Map<Place,PlayerStatistics> playerStats)
Setter for the player statistics map.

Parameters:
playerStats - Map of player statistics.

setDivisibleByNPlayer

public void setDivisibleByNPlayer(Place divisibleByNPlayer)
Setter for divisibleByNPlayer.

Parameters:
divisibleByNPlayer - Player used for the divisible by N adjustments.

getDivisibleByNPlayer

public Place getDivisibleByNPlayer()
Getter for property 'divisibleByNPlayer' - player used for the divisible by N adjustments.

Returns:
Value for property 'divisibleByNPlayer'.

getNumberOfPlayers

public int getNumberOfPlayers()
Returns the number of players in the game.

Returns:
The number of players in the game.

clearResults

public void clearResults()
Clears state associated with a game session.


toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object


Copyright © 2008. All Rights Reserved.