se.chalmers.dat255.risk.model
public class Card extends java.lang.Object implements ICard
ICard.CardType
Constructor and Description |
---|
Card(ICard.CardType type,
java.lang.String name)
Constructor for creating a card with the given type and string or the
string "Joker" if the given type is JOKER.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Compares two Cards.
|
java.lang.String |
getName()
Method for accessing the name(id) of the province belonging to a card.
|
ICard.CardType |
getType()
Method for accessing the type of a card.
|
int |
hashCode() |
boolean |
isActive()
Checks if the card is active
|
void |
setActive(boolean active)
Changes the state of the card
|
public Card(ICard.CardType type, java.lang.String name)
type
- the type of the card.name
- the name of the province belonging to the card being created.public java.lang.String getName()
ICard
public ICard.CardType getType()
ICard
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void setActive(boolean active)
ICard