org.dartra.games.practice
Class ClosestToZoneGame
java.lang.Object
org.dartra.standard.PersistentObject
org.dartra.standard.StandardGame
org.dartra.games.practice.TargetPracticeGame
org.dartra.games.practice.ClosestToZoneGame
- All Implemented Interfaces:
- Game, Persistent
- public class ClosestToZoneGame
- extends TargetPracticeGame
Simple game where the players have to throw as close as possible to
a designated target zone. When there is an ex-aequo, the last to throw
wins. The score of this game is the distance of the trow to the target.
- Author:
- Erwin Vervaet
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ClosestToZoneGame
public ClosestToZoneGame(Board board,
Player[] players,
StringProperties props)
ClosestToZoneGame
public ClosestToZoneGame(Board board,
Player[] players,
Zone targetZone)
registerHit
public void registerHit(Zone hitTargetZone,
Hit hit)
- Description copied from interface:
Game
Register the hit of a dart on the board. A particular zone of the
board was targetted.
- Specified by:
registerHit
in interface Game
- Overrides:
registerHit
in class TargetPracticeGame
getPlayerScore
public Score getPlayerScore(Player player)
- Description copied from interface:
Game
Get the current score for given player in this game.
- Specified by:
getPlayerScore
in interface Game
- Overrides:
getPlayerScore
in class TargetPracticeGame