|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.htwdd.rosenkoenig.game.Player
de.htwdd.rosenkoenig.game.HumanPlayer
public class HumanPlayer
Human player class.
| Field Summary |
|---|
| Fields inherited from class de.htwdd.rosenkoenig.game.Player |
|---|
canMove, cards, game, hasMoved, highscore, knights, name, score |
| Constructor Summary | |
|---|---|
HumanPlayer()
Ctor - empty |
|
HumanPlayer(java.lang.String name)
Ctor - setting the name of the player |
|
| Method Summary | |
|---|---|
org.jdom.Element |
createXml()
|
protected void |
extractPlayer(org.jdom.Element xmlPlayer)
|
boolean |
isInteractive()
Yes, this is an interactive player. |
void |
turn()
Must be implemented even though it does nothing because human player interacts with GUI. |
| Methods inherited from class de.htwdd.rosenkoenig.game.Player |
|---|
equals, getCanMove, getCards, getGame, getHasMoved, getHighscore, getKnights, getName, getNumberOfCards, getScore, loadFromFile, saveToDir, setCanMove, setCards, setGame, setHasMoved, setHighscore, setKnights, setName, setScore, updateHighscore |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HumanPlayer()
public HumanPlayer(java.lang.String name)
name - name of the player| Method Detail |
|---|
protected void extractPlayer(org.jdom.Element xmlPlayer)
extractPlayer in class PlayerxmlPlayer - player's XML snippet to contain attributes.
Extract human player's attributes from xmlPlayer.public org.jdom.Element createXml()
createXml in class Playerpublic void turn()
turn in class Playerpublic boolean isInteractive()
isInteractive in class Player
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||