com.anji.tournament
Interface Game

All Known Implementing Classes:
GomokuGame, IteratedGame, RoshamboGame, TttGame

public interface Game

Game does not carry state of a specific contest between two players. Each call to play(Player, Player) is a specific contest, creating whatever game state is needs. Note: A game should be "fair" between the two players. Any game for which there is a significant advantage for moving first should play 2 games, one with each subject going first.

Author:
Philip Tucker

Method Summary
 int getMaxScore(ScoringWeights weights)
           
 int getMinScore(ScoringWeights weights)
           
 GameResults play(PlayerResults contestantResults, PlayerResults opponentResults)
           
 java.lang.Class requiredPlayerClass()
           
 

Method Detail

play

public GameResults play(PlayerResults contestantResults,
                        PlayerResults opponentResults)
Parameters:
contestantResults -
opponentResults -
Returns:
GameResults for this game only; these totals are also added to each players results

requiredPlayerClass

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

getMaxScore

public int getMaxScore(ScoringWeights weights)
Parameters:
weights -
Returns:
maximum possible score for a single game, given these scoring weights

getMinScore

public int getMinScore(ScoringWeights weights)
Parameters:
weights -
Returns:
minimum possible score for a single game game, given these scoring weights