|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjskat.player.AIPlayerMJL.CardMemory
public class CardMemory
CardMemory builds the memory of all the cards that have been played during a certain game. It remembers all the initial cards as well as the individual hands of all players.
| Constructor Summary | |
|---|---|
CardMemory()
Default constructor |
|
CardMemory(int gameType,
int trump)
Extended constructor with the values of the current game |
|
| Method Summary | |
|---|---|
void |
addTrick(CardVector trick,
int forehandPlayer)
Adds the cards of the current trick to the memory |
int |
remainingCards(int suit,
CardVector myCards)
Calculates how many cards of that suit are still out. |
int |
timesDemanded(int suit)
Counts, how many times the given suit has been demanded as initial card. |
int |
timesPlayedByPlayer(int player,
int suit)
Counts, how many cards of a given suit a player has already played. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CardMemory()
public CardMemory(int gameType,
int trump)
gameType - trump - | Method Detail |
|---|
public void addTrick(CardVector trick,
int forehandPlayer)
trick - current trickforehandPlayer - player of the first card in the trick
public int timesPlayedByPlayer(int player,
int suit)
player - Player who is evaluatedsuit - Suit which is evaluated
public int timesDemanded(int suit)
suit - Suit which is evaluated
public int remainingCards(int suit,
CardVector myCards)
suit - Suit which is evaluatedmyCards - Hand of the player
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||