|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjskat.share.Card
public class Card
Card class
| Field Summary | |
|---|---|
(package private) static org.apache.log4j.Logger |
log
|
| Constructor Summary | |
|---|---|
Card(int suit,
int value)
Creates a new instance of Card |
|
Card(java.lang.String card)
Creates a new instance of Card by a definition string in the form of "SUIT-VALUE", each being a one-character abbreviation: e.g. |
|
| Method Summary | |
|---|---|
boolean |
beats(Card cardToCompare,
GameAnnouncement gameAnnouncement,
Card firstTrickCard)
Checks whether the card beats another given card under the current game type and trumpf color with respect to the initial card on the table |
boolean |
beats(Card cardToCompare,
int gameType,
int currentTrumpColor,
int initialColor)
Deprecated. |
boolean |
equals(Card card)
Implementation of the equals() method |
boolean |
equals(java.lang.Object card)
|
int |
getCalcValue()
Get the Card value for calculations |
int |
getNullValue()
Get the Card value for null games |
int |
getRamschValue()
Get the Card value for ramsch games |
int |
getSuit()
Get the Card suit |
int |
getSuitGrandValue()
Get the Card value for suit or grand games |
int |
getSuitValue()
Get the Card suit value |
int |
getValue()
Get the Card value |
boolean |
isSameCalcValue(Card cardToCompare)
Compares the Cards whether the value is the same or not |
boolean |
isSameNullValue(Card cardToCompare)
Compares the Cards whether the value is the same or not |
boolean |
isSameRamschValue(Card cardToCompare)
Compares the Cards whether the value is the same or not |
boolean |
isSameSuit(Card cardToCompare)
Compares the Cards whether the suit is the same or not |
boolean |
isSameSuitGrandValue(Card cardToCompare)
Compares the Cards whether the value is the same or not |
boolean |
isSameValue(Card cardToCompare)
Compares the Cards whether the value is the same or not |
boolean |
isTrump(int currentTrumpColor)
Deprecated. |
boolean |
isTrump(int gameType,
int trumpColor)
Checks whether a Card is a trump card or not |
java.lang.String |
toString()
Implementation of the toString() method |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
static org.apache.log4j.Logger log
| Constructor Detail |
|---|
public Card(java.lang.String card)
card -
public Card(int suit,
int value)
| Method Detail |
|---|
public boolean isSameSuit(Card cardToCompare)
public boolean isSameValue(Card cardToCompare)
public boolean isSameCalcValue(Card cardToCompare)
public boolean isSameSuitGrandValue(Card cardToCompare)
public boolean isSameNullValue(Card cardToCompare)
public boolean isSameRamschValue(Card cardToCompare)
public int getSuit()
public int getSuitValue()
public int getValue()
public int getCalcValue()
public int getSuitGrandValue()
public int getNullValue()
public int getRamschValue()
public boolean beats(Card cardToCompare,
int gameType,
int currentTrumpColor,
int initialColor)
cardToCompare - gameType - currentTrumpColor - initialColor -
public boolean beats(Card cardToCompare,
GameAnnouncement gameAnnouncement,
Card firstTrickCard)
cardToCompare - gameAnnouncement - firstTrickCard -
public boolean isTrump(int currentTrumpColor)
currentTrumpColor -
public boolean isTrump(int gameType,
int trumpColor)
gameType - The game type within the card is checkedtrumpColor - The trump color, only needed in suit games
public boolean equals(java.lang.Object card)
equals in class java.lang.Objectpublic boolean equals(Card card)
card - The Card to compare
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 | |||||||||