public class CardSet
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACE |
static java.lang.String |
CLUB |
static java.lang.String |
DIAMOND |
static java.lang.String |
HEART |
static java.lang.String |
JACK |
static java.lang.String |
KING |
static int |
NUMBER_CARDS |
static int |
NUMBER_PACKS |
static java.lang.String |
QUEEN |
static java.lang.String |
SPADE |
Constructor and Description |
---|
CardSet()
Cards have to be encoded as Strings, cause they are being sent as a message's content
and only Strings are allowed as the content-objects of ACLMessages
(exceptions are Predicates and Actions, but these are ontology-specific objects)
|
Modifier and Type | Method and Description |
---|---|
static int |
calculateDeckValue(Card[] cards)
This method calculates the overall value of a cardSet.
|
Card |
drawCard()
This method returns a randomly chosen card from the cardSet.
|
java.lang.String |
toString()
Create a string representation of the card set.
|
public static final int NUMBER_PACKS
public static final int NUMBER_CARDS
public static final java.lang.String JACK
public static final java.lang.String QUEEN
public static final java.lang.String KING
public static final java.lang.String ACE
public static final java.lang.String DIAMOND
public static final java.lang.String HEART
public static final java.lang.String SPADE
public static final java.lang.String CLUB
public CardSet()
public Card drawCard()
public static int calculateDeckValue(Card[] cards)
public java.lang.String toString()
toString
in class java.lang.Object