|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dartra.standard.PersistentObject
org.dartra.standard.StandardGame
org.dartra.games.x01.X01Game
An x01 darts game.
The exact rules for an x01 game can be found at Rules for x01.
Constructor Summary | |
X01Game(StandardBoard board,
Player[] players,
int startScore,
boolean doubleIn,
boolean doubleOut)
|
|
X01Game(StandardBoard board,
Player[] players,
StringProperties props)
|
Method Summary | |
Objective |
getObjective()
Get the current objective of the game: the current player should try to hit a zone of the board, or should end this turn. |
Score |
getPlayerScore(Player player)
Get the current score for given player in this game. |
StringProperties |
getProperties()
Subclasses should implement this to properly return their game specific properties (for instance the "start score" for an x01 game). |
int |
getStartScore()
|
ZoneSuggestionStrategy |
getZoneSuggestionStrategy()
|
boolean |
isDoubleIn()
|
boolean |
isDoubleOut()
|
void |
registerHit(Zone hitTargetZone,
Hit hit)
Register the hit of a dart on the board. |
void |
setZoneSuggestionStrategy(ZoneSuggestionStrategy strat)
|
java.lang.String |
toString()
|
Methods inherited from class org.dartra.standard.StandardGame |
accept, addGameEventListener, addTurn, getBoard, getCurrentPlayer, getCurrentTurn, getEndTime, getFirstPlayer, getGameEventListeners, getName, getPlayer, getPlayers, getPlayerTurn, getPlayerTurnHistory, getStartTime, getTurn, getTurnHistory, getWinner, removeGameEventListener, setEndTime, setFirstPlayer, setPlayers, setStartTime, setWinner, start, undoHit |
Methods inherited from class org.dartra.standard.PersistentObject |
getId, setId |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.dartra.framework.Persistent |
getId, setId |
Constructor Detail |
public X01Game(StandardBoard board, Player[] players, StringProperties props)
public X01Game(StandardBoard board, Player[] players, int startScore, boolean doubleIn, boolean doubleOut)
Method Detail |
public int getStartScore()
public boolean isDoubleIn()
public boolean isDoubleOut()
public void setZoneSuggestionStrategy(ZoneSuggestionStrategy strat)
public ZoneSuggestionStrategy getZoneSuggestionStrategy()
public Objective getObjective()
Game
Get the current objective of the game: the current player should try to hit a zone of the board, or should end this turn.
public void registerHit(Zone hitTargetZone, Hit hit)
Game
Register the hit of a dart on the board. A particular zone of the board was targetted.
public Score getPlayerScore(Player player)
Game
Get the current score for given player in this game.
public java.lang.String toString()
toString
in class StandardGame
public StringProperties getProperties()
StandardGame
Subclasses should implement this to properly return their game specific properties (for instance the "start score" for an x01 game).
It is legal to return null if there are no game specific properties.
getProperties
in class StandardGame
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |