public class VictoryPointManager
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private int |
CityValue |
private int |
currentLargestArmyPlayer |
private int |
currentLargestArmySize |
private int |
currentLongestRoadPlayer |
private int |
LargestArmyValue |
private int |
LongestRoadValue |
private int |
RoadValue |
private static long |
serialVersionUID |
private int |
SettlementValue |
private int[] |
victoryPoints |
Constructor and Description |
---|
VictoryPointManager()
Generic default contructor
|
VictoryPointManager(int p1Score,
int p2Score,
int p3Score,
int p4Score,
int currRoadOwner,
int currArmyOwner,
int armySize) |
Modifier and Type | Method and Description |
---|---|
private void |
adjustPlayersPoints(int playerID,
int points) |
boolean |
anyWinner()
Checks if anyone has won yet
|
void |
checkPlayerArmySize(int playerIndex,
int armySize)
Checks to see a player's army size, if so update their points accordingly
|
boolean |
equals(java.lang.Object obj) |
int |
getCurrentLargestArmyPlayer() |
int |
getCurrentLongestRoadPlayer() |
int |
getVictoryPoints(int playerID)
Gets the current number of victory points the current player has
|
int |
hashCode() |
void |
playedMonument(int playerIndex) |
void |
playerBuiltCity(int playerIndex)
The player built a city, so points to them
|
void |
playerBuiltRoad(int playerIndex)
The player built a road, so give them the points
|
void |
playerBuiltSettlement(int playerIndex)
The player built a settlement, so points to them
|
void |
playerGotDevCard(int playerIndex,
DevCardType card)
The player bought a dev card to give them the parts
|
private boolean |
setPlayerToHaveLargestArmy(int playerIndex)
Tells the VP manager which player now has the largest army - determined by @see map?
|
boolean |
setPlayerToHaveLongestRoad(int playerIndex)
Tells the victory point manager which player now has the longest road- determined by map?
|
int |
winner()
Returns the winner, if there is any
|
private static final long serialVersionUID
private int currentLongestRoadPlayer
private int currentLargestArmyPlayer
private int[] victoryPoints
private int currentLargestArmySize
private final int LongestRoadValue
private final int LargestArmyValue
private final int RoadValue
private final int SettlementValue
private final int CityValue
public VictoryPointManager(int p1Score, int p2Score, int p3Score, int p4Score, int currRoadOwner, int currArmyOwner, int armySize)
p1Score
- p2Score
- p3Score
- p4Score
- currRoadOwner
- currArmyOWner
- armySize
- public VictoryPointManager()
public int getVictoryPoints(int playerID)
playerIndex
- 0 to 3private void adjustPlayersPoints(int playerID, int points)
public void playedMonument(int playerIndex)
public boolean setPlayerToHaveLongestRoad(int playerIndex)
playerIndex
- 0 to 3private boolean setPlayerToHaveLargestArmy(int playerIndex)
playerIndex
- 0 to 3Map
public void checkPlayerArmySize(int playerIndex, int armySize)
playerIndex
- 0-3armySize
- 0-10?public void playerBuiltRoad(int playerIndex)
playerIndex
- public void playerBuiltSettlement(int playerIndex)
playerIndex
- public void playerBuiltCity(int playerIndex)
playerIndex
- public void playerGotDevCard(int playerIndex, DevCardType card)
playerIndex
- card
- the card they received (for determining worth)public boolean anyWinner()
public int winner()
public int getCurrentLongestRoadPlayer()
public int getCurrentLargestArmyPlayer()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object