Class Cards
java.lang.Object
GameRules
Cards
public class Cards extends GameRules
this class manage a full set cards
its one of GameRules subclass
-
Field Summary
Fields inherited from class GameRules
black, blue, green, plus2Counter, plus4Counter, red, sideBase, yellow
-
Constructor Summary
Constructors Constructor Description Cards()
creat a new cards -
Method Summary
Modifier and Type Method Description boolean
containKey(java.lang.String key)
check if the given key is available or notjava.lang.String
getValue(java.lang.String key)
get card String for given keyjava.util.Collection<java.lang.String>
getValues()
return list of 108 cardsvoid
removeCard(java.lang.String key, java.lang.String value)
remove a card with given key and valueMethods inherited from class GameRules
cardAction, checkPutCard, designGround, endGame, firstBase, getColor, getDirection, getNumber, getPlusFourState, getPlusTwoState, getTurn, giveCard, printScore, printScoreChart, putCart, setDirection, setTurn
-
Constructor Details
-
Cards
public Cards()creat a new cards
-
-
Method Details
-
getValues
public java.util.Collection<java.lang.String> getValues()return list of 108 cards- Returns:
- values of cards
-
getValue
public java.lang.String getValue(java.lang.String key)get card String for given key- Parameters:
key
- of card- Returns:
- card
-
removeCard
public void removeCard(java.lang.String key, java.lang.String value)remove a card with given key and value- Parameters:
key
- of cardvalue
- of card
-
containKey
public boolean containKey(java.lang.String key)check if the given key is available or not- Parameters:
key
- of card- Returns:
- true of false
-