|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmhframework.MHActor
mhframework.media.MHPlayingCard
public class MHPlayingCard
Field Summary | |
---|---|
static int |
ACE
|
static int |
CARD_BACK
|
static int |
DEUCE
|
static int |
EIGHT
|
static int |
FIVE
|
static int |
FOUR
|
static int |
JACK
|
static int |
KING
|
static int |
NINE
|
static int |
QUEEN
|
static int |
SEVEN
|
static int |
SIX
|
static int |
SUIT_CLUBS
|
static int |
SUIT_DIAMONDS
|
static int |
SUIT_HEARTS
|
static int |
SUIT_SPADES
|
static int |
TEN
|
static int |
THREE
|
Constructor Summary | |
---|---|
MHPlayingCard(int cardNumber)
|
|
MHPlayingCard(int cardFace,
int cardSuit)
|
Method Summary | |
---|---|
boolean |
equals(int otherCardNumber)
|
boolean |
equals(int otherCardFace,
int otherCardSuit)
|
boolean |
equals(MHPlayingCard otherCard)
|
int |
getCardNumber()
Return the unique identifier for this card. |
int |
getFace()
Return an integer indicating the face of this card. |
java.awt.Image |
getImage()
Returns current animation frame. |
MHImageGroup |
getImageGroup()
|
int |
getSuit()
Return an integer indicating the suit of this card. |
boolean |
isFaceDown()
|
void |
render(java.awt.Graphics2D g)
Draws the actor onto the sent graphics object based on its current action, animation frame number, and (x, y) coordinates |
void |
setFaceDown(boolean isFaceDown)
|
java.lang.String |
toString()
Returns a string representation of this card. |
Methods inherited from class mhframework.MHActor |
---|
advance, getAnimationSequenceNumber, getBounds, getCenterX, getCenterY, getFrameCount, getFrameNumber, getFrameTimer, getHealth, getHeight, getHorizontalSpeed, getMaxHealth, getRotation, getRotationSpeed, getScale, getScaledBounds, getSpeed, getVerticalSpeed, getWidth, getX, getY, isAnimationFinished, render, setAnimationSequence, setFrameNumber, setFrameTimer, setHealth, setHorizontalSpeed, setImageGroup, setLocation, setMaxHealth, setRotation, setRotationSpeed, setScale, setSpeed, setVerticalSpeed, setX, setY |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int ACE
public static final int DEUCE
public static final int THREE
public static final int FOUR
public static final int FIVE
public static final int SIX
public static final int SEVEN
public static final int EIGHT
public static final int NINE
public static final int TEN
public static final int JACK
public static final int QUEEN
public static final int KING
public static final int SUIT_SPADES
public static final int SUIT_DIAMONDS
public static final int SUIT_CLUBS
public static final int SUIT_HEARTS
public static final int CARD_BACK
Constructor Detail |
---|
public MHPlayingCard(int cardFace, int cardSuit)
cardFace
- cardSuit
- public MHPlayingCard(int cardNumber)
cardFace
- cardSuit
- Method Detail |
---|
public MHImageGroup getImageGroup()
getImageGroup
in class MHActor
public java.awt.Image getImage()
MHActor
getImage
in class MHActor
public boolean equals(MHPlayingCard otherCard)
public boolean equals(int otherCardNumber)
public boolean equals(int otherCardFace, int otherCardSuit)
public void render(java.awt.Graphics2D g)
MHActor
render
in interface MHRenderable
render
in class MHActor
g
- The Graphics object on which to draw the actorpublic int getFace()
public int getCardNumber()
public int getSuit()
public void setFaceDown(boolean isFaceDown)
public boolean isFaceDown()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |