public class Player.PlayerStats
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
absorbed
Number of objects absorbed in merges by this player.
|
private int |
claims
Number of objects directly claimed by this player.
|
private int |
merges
Number of merges performed by this player.
|
private java.util.List<java.lang.Double> |
scoreHistory
Player score at the end of each turn.
|
private long |
totalTurnTime
Total time spent across all turns.
|
private int |
turns
Total number of player turns.
|
Constructor and Description |
---|
PlayerStats() |
Modifier and Type | Method and Description |
---|---|
void |
addAbsorbed(int n)
Increments the total number of objects absorbed
in merges by the given number.
|
void |
addClaim()
Increments the total number of objects claimed by one.
|
void |
addMerge()
Increments the total number of merges by one.
|
void |
addTurnTime(long time)
Adds the time a player turn took.
|
int |
getAbsorbed()
Gets the total number of unrelated objects absorbed by merges.
|
long |
getAverageTurnTime()
Gets the average number of milliseconds per turn for this player.
|
int |
getClaims()
Gets the total number of objects claimed by this player.
|
int |
getMerges()
Gets the total number of merges performed by this player.
|
java.util.List<java.lang.Double> |
getScoreHistory()
Gets the score per turn for this player.
|
int |
getTurns()
Gets the total number of turns for this player.
|
private int claims
private int merges
private int absorbed
private long totalTurnTime
private int turns
private java.util.List<java.lang.Double> scoreHistory
public void addClaim()
public void addMerge()
public void addAbsorbed(int n)
n
- The number of absorbed objects to add.public void addTurnTime(long time)
time
- The turn time.public int getClaims()
public int getMerges()
public int getAbsorbed()
public long getAverageTurnTime()
public java.util.List<java.lang.Double> getScoreHistory()
public int getTurns()