|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjagafa.ai.ProbabilityTable
public class ProbabilityTable
ProbabylityTable provides functions to calculate probabilities for all players having cards of a color or having a specific card (all from the view of a Player) ProbabilityTable is the core of the ProbabilityAI AI implementation
ProbabilityAI| Constructor Summary | |
|---|---|
ProbabilityTable(Player p,
JassRound game)
Constructor: Create the ProbabilityTable and init all values |
|
| Method Summary | |
|---|---|
float |
getCardProb(Player p,
Card c)
Get the probability of a Player having a specific card |
float |
getColorProb(Player p,
int color)
Get the probability of a Player having cards of a specific color |
java.lang.String |
toString()
|
void |
update()
Update the table |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ProbabilityTable(Player p,
JassRound game)
p - The viewpoint Playergame - The game object| Method Detail |
|---|
public void update()
public float getColorProb(Player p,
int color)
p - The relevant Playercolor - The relevant color
public float getCardProb(Player p,
Card c)
p - The relevant Playerc - The relevant card
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||