|
Jadex 0.96 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjadex.examples.blackjack.CardSet
public class CardSet
This class represents a whole blackjack-cardSet. Blackjack-cardSets are usually composed of 6 'normal' cardSets, each containing 52 cards.
Field Summary | |
---|---|
static String |
ACE
|
static String |
CLUB
|
static String |
DIAMOND
|
static String |
HEART
|
static String |
JACK
|
static String |
KING
|
static int |
NUMBER_CARDS
|
static int |
NUMBER_PACKS
|
static String |
QUEEN
|
static String |
SPADE
|
Constructor Summary | |
---|---|
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) |
Method Summary | |
---|---|
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. |
String |
toString()
Create a string representation of the card set. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int NUMBER_PACKS
public static final int NUMBER_CARDS
public static final String JACK
public static final String QUEEN
public static final String KING
public static final String ACE
public static final String DIAMOND
public static final String HEART
public static final String SPADE
public static final String CLUB
Constructor Detail |
---|
public CardSet()
Method Detail |
---|
public Card drawCard()
public static int calculateDeckValue(Card[] cards)
public String toString()
toString
in class Object
|
Jadex 0.96 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.