public class StateDealingMap
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private java.util.HashMap<java.lang.Integer,Dealing> |
map |
| Constructor and Description |
|---|
StateDealingMap(Dealing point,
int players)
Builds a StateDealingMap with all possible dealings.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
addToMap(Dealing dealing,
Dealing point)
Saves a dealing to the map.
|
private void |
buildMap(int[] categorySizes,
int players,
Dealing point,
int totalCards)
Builds the Hashmap
|
private java.util.ArrayList<DealingState> |
dealCardTo(int playerID,
DealingState state) |
private java.util.ArrayList<Dealing> |
dealNCardsTo(int playerID,
Dealing soFar,
int n)
Wrapper function
|
private java.util.ArrayList<DealingState> |
dealNCardsTo(int playerID,
DealingState state,
int n) |
Dealing |
get(java.lang.Integer state) |
Dealing |
getValuation(int state) |
private void |
mapDealings(int playerID,
Dealing soFar,
int players,
Dealing point,
int maxHandSize,
int cardsLeft) |
Dealing |
point() |
private java.util.ArrayList<Dealing> |
possibleEnvelopeDealings(int catNr,
Dealing soFar,
int[] categorySizes) |
int |
size() |
private java.util.HashMap<java.lang.Integer,Dealing> map
public StateDealingMap(Dealing point, int players)
point - The point of the Kripke Model that contains this StateDealingMapplayers - The number of agents in the KripkeModelpublic Dealing get(java.lang.Integer state)
public int size()
private void buildMap(int[] categorySizes,
int players,
Dealing point,
int totalCards)
categorySizes - List of sizes of card getCategoriesplayers - Number of players in the gamepoint - Point of pointed modeltotalCards - Total number of cards in the gameprivate java.util.ArrayList<Dealing> possibleEnvelopeDealings(int catNr, Dealing soFar, int[] categorySizes)
catNr - Current category numbersoFar - Dealing to the envelope so farcategorySizes - List of sizes of card getCategoriesprivate void mapDealings(int playerID,
Dealing soFar,
int players,
Dealing point,
int maxHandSize,
int cardsLeft)
playerID - Player that is currently being dealt tosoFar - The dealing so farplayers - Number of players in the gamepoint - Point of the modelmaxHandSize - Maximum number of cards a playercardsLeft - Number of cards that have not been dealt yetprivate java.util.ArrayList<Dealing> dealNCardsTo(int playerID, Dealing soFar, int n)
playerID - Player to be dealt tosoFar - The dealing so farn - number of cards to be dealtprivate java.util.ArrayList<DealingState> dealNCardsTo(int playerID, DealingState state, int n)
playerID - Player to be dealt tostate - Current dealing state keeping track of the previous card being dealt. New cards should be drawn from further in the deck so that there cannot be duplicate states.n - number of cards to be dealtprivate void addToMap(Dealing dealing, Dealing point)
dealing - The dealing to be saved to the mappoint - The point of the Kripke model of which the states are being constructedprivate java.util.ArrayList<DealingState> dealCardTo(int playerID, DealingState state)
playerID - Agent that is being dealt tostate - current state of the dealing, keeping track of the previously dealt cardpublic final Dealing point()
public final Dealing getValuation(int state)
state - A state in the KripkeModel