com.planet_ink.coffee_mud.Items.MiscMagic
Class StdHandOfCards

java.lang.Object
  extended by com.planet_ink.coffee_mud.Items.Basic.StdItem
      extended by com.planet_ink.coffee_mud.Items.Basic.StdContainer
          extended by com.planet_ink.coffee_mud.Items.MiscMagic.StdHandOfCards
All Implemented Interfaces:
Behavable, CMModifiable, CMObject, Environmental, MsgListener, Rider, StatsAffecting, Tickable, Container, HandOfCards, Item, MiscMagic, java.lang.Cloneable, java.lang.Comparable<CMObject>
Direct Known Subclasses:
StdDeckOfCards

public class StdHandOfCards
extends StdContainer
implements MiscMagic, HandOfCards


Field Summary
 
Fields inherited from class com.planet_ink.coffee_mud.Items.Basic.StdContainer
capacity, containType, hasALid, hasALock, isLocked, isOpen
 
Fields inherited from class com.planet_ink.coffee_mud.Items.Basic.StdItem
affects, baseEnvStats, baseGoldValue, behaviors, CODES, databaseID, description, destroyed, displayText, dispossessionTime, envStats, imageName, material, miscText, myContainer, myUses, myWornCode, name, owner, properWornBitmap, riding, scripts, secretIdentity, tickStatus, wornLogicalAnd, xtraValues
 
Fields inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Container
CONTAIN_ANYTHING, CONTAIN_BODIES, CONTAIN_CAGED, CONTAIN_CLOTHES, CONTAIN_COINS, CONTAIN_DAGGERS, CONTAIN_DESCS, CONTAIN_DRINKABLES, CONTAIN_FOOTWEAR, CONTAIN_KEYS, CONTAIN_LIQUID, CONTAIN_ONEHANDWEAPONS, CONTAIN_OTHERWEAPONS, CONTAIN_READABLES, CONTAIN_SCROLLS, CONTAIN_SMOKEABLES, CONTAIN_SSCOMPONENTS, CONTAIN_SWORDS
 
Constructor Summary
StdHandOfCards()
           
 
Method Summary
 boolean addCard(PlayingCard card)
           
 boolean canContain(Environmental E)
           
 boolean containsAtLeastOneOfSuit(int cardBitCode)
           
 boolean containsAtLeastOneOfSuit(java.lang.String cardStringCode)
           
 boolean containsAtLeastOneOfValue(int cardBitCode)
           
 boolean containsAtLeastOneOfValue(java.lang.String cardStringCode)
           
 boolean containsCard(int cardBitCode)
           
 boolean containsCard(java.lang.String cardStringCode)
           
 HandOfCards createEmptyHand(Environmental player)
           
 void executeMsg(Environmental host, CMMsg msg)
          The general message event handler for the object.
 PlayingCard getCard(int cardBitCode)
           
 PlayingCard getCard(java.lang.String cardStringCode)
           
 java.util.Vector getContents()
           
 java.lang.String[] getContentsEncoded()
           
 PlayingCard getFirstCardOfSuit(int cardBitCode)
           
 PlayingCard getFirstCardOfSuit(java.lang.String cardStringCode)
           
 PlayingCard getFirstCardOfValue(int cardBitCode)
           
 PlayingCard getFirstCardOfValue(java.lang.String cardStringCode)
           
 PlayingCard getTopCardFromDeck()
           
 java.lang.String ID()
          The CoffeeMud Java Class ID shared by all instances of this object.
 int numberOfCards()
           
 boolean removeAllCards()
           
 boolean removeCard(PlayingCard card)
           
 boolean shuffleDeck()
           
 void sortByValueAceHigh()
           
 void sortByValueAceLow()
           
 
Methods inherited from class com.planet_ink.coffee_mud.Items.Basic.StdContainer
capacity, containTypes, emptyPlease, hasALid, hasALock, isLocked, isOpen, keyName, okMessage, reallyGetContents, setCapacity, setContainTypes, setKeyName, setLidsNLocks, setMiscText, tick
 
Methods inherited from class com.planet_ink.coffee_mud.Items.Basic.StdItem
abilityImbuesMagic, addBehavior, addEffect, addNonUninvokableEffect, addScript, affectCharState, affectCharStats, affectEnvStats, alreadyWornMsg, amDestroyed, amWearingAt, baseEnvStats, baseGoldValue, canWear, canWearComplete, cloneEffects, cloneFix, compareProperLocations, compareTo, container, copyOf, databaseID, delBehavior, delEffect, delScript, description, destroy, displayText, envStats, expirationDate, fetchBehavior, fetchBehavior, fetchEffect, fetchEffect, fetchScript, finalize, fitsOn, getCodeNum, getSaveStatIndex, getStat, getStatCodes, getTickStatus, image, initializeClass, isGeneric, isStat, material, maxRange, minRange, miscTextFormat, name, Name, newInstance, numBehaviors, numberOfItems, numEffects, numScripts, owner, rawImage, rawLogicalAnd, rawProperLocationBitmap, rawSecretIdentity, rawWornCode, readableText, recoverEnvStats, recursiveWeight, removeFromOwnerContainer, riding, sameAs, savable, secretIdentity, setBaseEnvStats, setBaseValue, setContainer, setDatabaseID, setDescription, setDisplayText, setExpirationDate, setImage, setMaterial, setName, setOwner, setRawLogicalAnd, setRawProperLocationBitmap, setRawWornCode, setReadableText, setRiding, setSecretIdentity, setStat, setUsesRemaining, stopTicking, subjectToWearAndTear, tackOns, text, ultimateContainer, unWear, usesRemaining, value, wearAt, wearEvenIfImpossible, wearIfPossible, whereCantWear
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Container
capacity, containTypes, emptyPlease, hasALid, hasALock, isLocked, isOpen, keyName, setCapacity, setContainTypes, setKeyName, setLidsNLocks
 

Constructor Detail

StdHandOfCards

public StdHandOfCards()
Method Detail

ID

public java.lang.String ID()
Description copied from interface: CMObject
The CoffeeMud Java Class ID shared by all instances of this object. Unlike the Java Class name, this method does not include package information. However, it must return a String value unique to its class category in the ClassLoader. Class categories include Libraries, Common, Areas, Abilities, Behaviors, CharClasses, Commands, Exits Locales, MOBS, Races, WebMacros, Basic Items, Armor, Weapons, ClanItems, MiscTech. The name is typically identical to the class name.

Specified by:
ID in interface CMObject
Overrides:
ID in class StdContainer
Returns:
the name of this class

getContents

public java.util.Vector getContents()
Specified by:
getContents in interface Container
Overrides:
getContents in class StdContainer

shuffleDeck

public boolean shuffleDeck()
Specified by:
shuffleDeck in interface HandOfCards

getTopCardFromDeck

public PlayingCard getTopCardFromDeck()
Specified by:
getTopCardFromDeck in interface HandOfCards

addCard

public boolean addCard(PlayingCard card)
Specified by:
addCard in interface HandOfCards

numberOfCards

public int numberOfCards()
Specified by:
numberOfCards in interface HandOfCards

removeCard

public boolean removeCard(PlayingCard card)
Specified by:
removeCard in interface HandOfCards

removeAllCards

public boolean removeAllCards()
Specified by:
removeAllCards in interface HandOfCards

getContentsEncoded

public java.lang.String[] getContentsEncoded()
Specified by:
getContentsEncoded in interface HandOfCards

sortByValueAceHigh

public void sortByValueAceHigh()
Specified by:
sortByValueAceHigh in interface HandOfCards

sortByValueAceLow

public void sortByValueAceLow()
Specified by:
sortByValueAceLow in interface HandOfCards

createEmptyHand

public HandOfCards createEmptyHand(Environmental player)
Specified by:
createEmptyHand in interface HandOfCards

containsCard

public boolean containsCard(java.lang.String cardStringCode)
Specified by:
containsCard in interface HandOfCards

getCard

public PlayingCard getCard(java.lang.String cardStringCode)
Specified by:
getCard in interface HandOfCards

getFirstCardOfValue

public PlayingCard getFirstCardOfValue(java.lang.String cardStringCode)
Specified by:
getFirstCardOfValue in interface HandOfCards

containsAtLeastOneOfValue

public boolean containsAtLeastOneOfValue(java.lang.String cardStringCode)
Specified by:
containsAtLeastOneOfValue in interface HandOfCards

containsAtLeastOneOfSuit

public boolean containsAtLeastOneOfSuit(java.lang.String cardStringCode)
Specified by:
containsAtLeastOneOfSuit in interface HandOfCards

getFirstCardOfSuit

public PlayingCard getFirstCardOfSuit(java.lang.String cardStringCode)
Specified by:
getFirstCardOfSuit in interface HandOfCards

containsCard

public boolean containsCard(int cardBitCode)
Specified by:
containsCard in interface HandOfCards

getCard

public PlayingCard getCard(int cardBitCode)
Specified by:
getCard in interface HandOfCards

getFirstCardOfValue

public PlayingCard getFirstCardOfValue(int cardBitCode)
Specified by:
getFirstCardOfValue in interface HandOfCards

containsAtLeastOneOfValue

public boolean containsAtLeastOneOfValue(int cardBitCode)
Specified by:
containsAtLeastOneOfValue in interface HandOfCards

containsAtLeastOneOfSuit

public boolean containsAtLeastOneOfSuit(int cardBitCode)
Specified by:
containsAtLeastOneOfSuit in interface HandOfCards

getFirstCardOfSuit

public PlayingCard getFirstCardOfSuit(int cardBitCode)
Specified by:
getFirstCardOfSuit in interface HandOfCards

canContain

public boolean canContain(Environmental E)
Specified by:
canContain in interface Container
Overrides:
canContain in class StdContainer

executeMsg

public void executeMsg(Environmental host,
                       CMMsg msg)
Description copied from interface: MsgListener
The general message event handler for the object. Messages passed herein may not necessarily be FOR this object, or from it, but will almost always represent events happening in the same room. The messages have already been through an approval process, so this method is called only to affect the final execution of the meaning of the message. Every game event goes through these methods.

Specified by:
executeMsg in interface MsgListener
Overrides:
executeMsg in class StdContainer
Parameters:
host - either the initiator of the event, or the host of this object
msg - the CMMsg that needs to be executed
See Also:
CMMsg