org.dartra.games.x01
Class X01Match
java.lang.Object
org.dartra.standard.PersistentObject
org.dartra.standard.StandardGame
org.dartra.standard.StandardMatch
org.dartra.standard.BestOfMatch
org.dartra.games.x01.X01Match
- All Implemented Interfaces:
- Game, Match, Persistent
- public class X01Match
- extends BestOfMatch
- implements Match
An x01 darts match. A match starts with a game of "closest to zone" to
decide the player that will throw first. Once the first player has been selected,
a number of normal x01 sets will be played to decide the winner of the match.
- Author:
- Erwin Vervaet
Method Summary |
protected Game |
createNewGame()
Create a new game for this match: an x01 set. |
StringProperties |
getProperties()
Subclasses should implement this to properly return their game specific
properties (for instance the "start score" for an x01 game).
|
Methods inherited from class org.dartra.standard.StandardMatch |
accept, addGame, addTurn, getCurrentGame, getCurrentPlayer, getCurrentTurn, getGame, getGames, getObjective, registerHit, undoHit |
Methods inherited from class org.dartra.standard.StandardGame |
addGameEventListener, getBoard, getEndTime, getFirstPlayer, getGameEventListeners, getName, getPlayer, getPlayers, getPlayerTurn, getPlayerTurnHistory, getStartTime, getTurn, getTurnHistory, getWinner, removeGameEventListener, setEndTime, setFirstPlayer, setPlayers, setStartTime, setWinner |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.dartra.framework.Game |
accept, addGameEventListener, getBoard, getCurrentPlayer, getCurrentTurn, getEndTime, getFirstPlayer, getGameEventListeners, getName, getObjective, getPlayer, getPlayers, getPlayerScore, getPlayerTurn, getPlayerTurnHistory, getStartTime, getTurn, getTurnHistory, getWinner, registerHit, removeGameEventListener, setFirstPlayer, setWinner, start, undoHit |
X01Match
public X01Match(StandardBoard board,
Player[] players,
StringProperties props)
X01Match
public X01Match(StandardBoard board,
Player[] players,
int bestOf,
int gamesPerSet,
int startScore,
boolean doubleIn,
boolean doubleOut)
createNewGame
protected Game createNewGame()
Create a new game for this match: an x01 set.
- Specified by:
createNewGame
in class BestOfMatch
getProperties
public StringProperties getProperties()
- Description copied from class:
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.
- Overrides:
getProperties
in class BestOfMatch