org.dartra.framework
Interface Match

All Superinterfaces:
Game, Persistent
All Known Implementing Classes:
ScramCricketGame, StandardMatch, X01Match

public interface Match
extends Game

A darts match. A match involves several games, so a match is a composed game (GoF composite design pattern). The games played in the context of a match are created by that match, so in a way a Match acts as a Game object factory.

The players of the match will normally also be the players participating in each game of the match.

Match objects have reference semantics.

Author:
Erwin Vervaet

Method Summary
 Game getCurrentGame()
          Return the currently active game of this match.
 Game getGame(int index)
          Return specified game of this match.
 java.util.Vector getGames()
          Return a list of all games played in this match so far.
 
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
 
Methods inherited from interface org.dartra.framework.Persistent
getId, setId
 

Method Detail

getGames

public java.util.Vector getGames()

Return a list of all games played in this match so far. The returned list contains Game objects.


getGame

public Game getGame(int index)

Return specified game of this match.


getCurrentGame

public Game getCurrentGame()

Return the currently active game of this match.