com.anji.ttt
Class TttGame

java.lang.Object
  extended by com.anji.ttt.TttGame
All Implemented Interfaces:
Game, Configurable

public class TttGame
extends java.lang.Object
implements Game, Configurable

Author:
Derek James

Constructor Summary
TttGame()
           
 
Method Summary
 int getMaxScore(ScoringWeights aWeights)
           
 int getMinScore(ScoringWeights aWeights)
           
 void init(Properties props)
           
 GameResults play(PlayerResults contestantResults, PlayerResults opponentResults)
           
 java.lang.Class requiredPlayerClass()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TttGame

public TttGame()
Method Detail

play

public GameResults play(PlayerResults contestantResults,
                        PlayerResults opponentResults)
Specified by:
play in interface Game
Returns:
GameResults for this game only; these totals are also added to each players results
See Also:
Game.play(com.anji.tournament.PlayerResults, com.anji.tournament.PlayerResults)

requiredPlayerClass

public java.lang.Class requiredPlayerClass()
Specified by:
requiredPlayerClass in interface Game
Returns:
class of which all players must be subclass (or implementor, if interface); must be implementor of Player
See Also:
Game.requiredPlayerClass()

getMaxScore

public int getMaxScore(ScoringWeights aWeights)
Specified by:
getMaxScore in interface Game
Returns:
maximum possible score for a single game, given these scoring weights
See Also:
Game.getMaxScore(com.anji.tournament.ScoringWeights)

getMinScore

public int getMinScore(ScoringWeights aWeights)
Specified by:
getMinScore in interface Game
Returns:
minimum possible score for a single game game, given these scoring weights
See Also:
Game.getMinScore(com.anji.tournament.ScoringWeights)

init

public void init(Properties props)
          throws java.lang.Exception
Specified by:
init in interface Configurable
Parameters:
props - configuration parameters
Throws:
java.lang.Exception
See Also:
Configurable.init(com.anji.util.Properties)