public class Dealing
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private int[][] |
dealing |
private java.util.Random |
rand |
| Constructor and Description |
|---|
Dealing(Dealing other) |
Dealing(int[] sizes)
Empty valuation with a specified size (empty means every card belongs to no one (-1)).
|
Dealing(int[][] dealing) |
| Modifier and Type | Method and Description |
|---|---|
void |
deal(int agent,
Card card)
This function alters this Dealing instance, where dealTo returns a copy of itself in which the specified card has been dealt to the specified player
|
void |
deal(int playerID,
int category,
int cardnumber)
This function alters this Dealing instance, where dealTo returns a copy of itself in which the specified card has been dealt to the specified player
|
Dealing |
dealTo(int playerID,
int category,
int cardnumber) |
Dealing |
envelopeDealing() |
boolean |
equals(Dealing other) |
int |
getCategories() |
boolean |
isTrue(PropVar var) |
int |
numberOfCards(int category) |
int |
player(int category,
int card) |
void |
print() |
private void |
randomDealing(int agent,
int agents,
java.util.ArrayList<Card> cardList) |
Dealing |
randomize(int agents)
Returns a random dealing to the specified number of agents
|
public Dealing(int[][] dealing)
dealing - List of categories with in each category a number of cards that are in the hands of a specific player e.g. [1][2] == 3 means player 3 has the second card of category 1.public Dealing(int[] sizes)
sizes - List of category sizes.public Dealing(Dealing other)
other - Valuation to be deep copied.public int getCategories()
public int numberOfCards(int category)
category - Category for which the number of cards is returnedpublic int player(int category,
int card)
public boolean isTrue(PropVar var)
var - Propositional variable to be evaluated in this valuation (Dealing)public void print()
public Dealing dealTo(int playerID, int category, int cardnumber)
playerID - Player that the specified card is dealt to.category - Category of the card that is being dealt.cardnumber - Card number of the card that is being dealt.public void deal(int playerID,
int category,
int cardnumber)
playerID - Player that the specified card is dealt to.category - Category of the card that is being dealt.cardnumber - Card number of the card that is being dealt.public void deal(int agent,
Card card)
agent - Player that the specified card is dealt to.card - Card that is being dealt.public Dealing randomize(int agents)
agents - Number of agents to be dealt to.private void randomDealing(int agent,
int agents,
java.util.ArrayList<Card> cardList)
public boolean equals(Dealing other)
public Dealing envelopeDealing()