org.vizzini.game.cardgame
Class AbstractCard
java.lang.Object
org.vizzini.game.AbstractToken
org.vizzini.game.cardgame.AbstractCard
- All Implemented Interfaces:
- Serializable, Cloneable, Comparable, ICard, IToken
- Direct Known Subclasses:
- PokerCard
public abstract class AbstractCard
- extends AbstractToken
- implements ICard
Provides a card for card games in the game framework.
- Since:
- v0.1
- Version:
- v0.2
- Author:
- Jeffrey M. Thompson
- See Also:
- Serialized Form
Methods inherited from class org.vizzini.game.AbstractToken |
addPropertyChangeListener, clone, configure, copy, getAgent, getIndex, getName, getPosition, getPropertyChangeManager, getTeam, getValue, isFiringPositionChanges, removePropertyChangeListener, setAgent, setFiringPositionChanges, setIndex, setName, setPosition, setTeam, setValue |
Methods inherited from interface org.vizzini.game.cardgame.ICard |
getIndex |
Methods inherited from interface org.vizzini.game.IToken |
addPropertyChangeListener, clone, configure, getAgent, getName, getPosition, getTeam, getValue, removePropertyChangeListener, setAgent, setName, setPosition, setTeam, setValue |
AbstractCard
public AbstractCard()
setSuit
public void setSuit(ISuit suit)
- Set the suit.
- Specified by:
setSuit
in interface ICard
- Since:
- v0.1
getSuit
public ISuit getSuit()
- Return the suit.
- Specified by:
getSuit
in interface ICard
- Since:
- v0.1
compareTo
public int compareTo(Object object)
- Compare this to the given object.
- Specified by:
compareTo
in interface Comparable
- Returns:
- -1,0,1 if this is less than, equal to, greater than object.
- Throws:
ClassCastException
- if another is not an instance of
AbstractCard
.- Since:
- v0.1
equals
public boolean equals(Object object)
- Return true if this equals the given object.
- Overrides:
equals
in class AbstractToken
- Parameters:
object
- The object to compare.- Since:
- v0.1
hashCode
public int hashCode()
- Returns a hash code value for the object.
- Overrides:
hashCode
in class AbstractToken
- Since:
- v0.1
toString
public String toString()
- Return a string representation of this object.
- Overrides:
toString
in class AbstractToken
- Since:
- v0.1
Copyright © 2007 Vizzini.org. All Rights Reserved.
|
2007.12.25.03.00.02 |