se.chalmers.dat255.risk.model
public interface IPlayer
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CARD_ADDED |
static java.lang.String |
CARD_REMOVED |
Modifier and Type | Method and Description |
---|---|
void |
addCard()
Takes a card from the deck and puts on the players hand.
|
void |
addListener(java.beans.PropertyChangeListener observer)
Adds a listener to this object
|
void |
discard()
Discards the players cards when s/he loses.
|
boolean |
exchangeCard(ICard c1,
ICard c2,
ICard c3)
Method for trading in cards for troops.
|
void |
gainProvince()
Increments the number of provinces that the player currently controls.
|
java.util.ArrayList<ICard> |
getCards()
Returns the cards on the players hand
|
int |
getId()
returns a players id
|
java.lang.String |
getName()
Returns the name of the player.
|
int |
getNrOfProvinces()
Returns the number of provinces that the player currently controls.
|
void |
loseProvince()
Decrements the number of provinces that the player currently controls.
|
static final java.lang.String CARD_ADDED
static final java.lang.String CARD_REMOVED
void addListener(java.beans.PropertyChangeListener observer)
observer
- the listener of this objectvoid addCard()
void gainProvince()
void loseProvince()
int getNrOfProvinces()
boolean exchangeCard(ICard c1, ICard c2, ICard c3)
java.lang.String getName()
java.util.ArrayList<ICard> getCards()
int getId()
void discard()