jagafa.scores
Interface ScoreTable

All Known Implementing Classes:
AbstractScoreTable, CoiffeurScoreTable, SchieberScoreTable

public interface ScoreTable


Method Summary
 void activateRule(RuleSet rule)
          Activate a RuleSet.
 void addScores(int[] scores, RuleSet rules)
          Add scores achieved with a specific RuleSet to the table.
 boolean canChangeChoosingPlayer()
           
 boolean changeChoosingPlayer()
          Change internally the player which can choose the RuleSet.
 void deactivateRule(RuleSet rule)
          Deactivate a RuleSet.
 int getChoosingPlayer()
          Get the player which can choose the ruleSet for the next round
 int getMultiplier(RuleSet rule)
          Returns the multiplier of an activated RuleSet.
 java.util.List<RuleSet> getRules()
          Get a list of all activated RuleSets
 int[] getScores()
          Get all the players scores from all the rounds played
 int getStartPlayer()
          Get the player which can start the next round
 int getWinningScore()
           
 boolean isGameOver()
          Check wether the Game is over or not
 boolean isRuleAvailable(RuleSet rule)
           
 void resetScores()
          Reset all scores to 0
 int roundsPlayed()
           
 void setStartPlayer(int pindex)
          Set the player which can start the next round
 

Method Detail

isRuleAvailable

boolean isRuleAvailable(RuleSet rule)

activateRule

void activateRule(RuleSet rule)
Activate a RuleSet. The RuleSet can be chosen after activation

Parameters:
rule -

deactivateRule

void deactivateRule(RuleSet rule)
Deactivate a RuleSet. The RuleSet is not a valid choice afterwards.

Parameters:
rule -

getRules

java.util.List<RuleSet> getRules()
Get a list of all activated RuleSets

Returns:

addScores

void addScores(int[] scores,
               RuleSet rules)
Add scores achieved with a specific RuleSet to the table.

Parameters:
scores -
rules -

getScores

int[] getScores()
Get all the players scores from all the rounds played

Returns:

resetScores

void resetScores()
Reset all scores to 0


isGameOver

boolean isGameOver()
Check wether the Game is over or not

Returns:

setStartPlayer

void setStartPlayer(int pindex)
Set the player which can start the next round

Parameters:
p -

getStartPlayer

int getStartPlayer()
Get the player which can start the next round


changeChoosingPlayer

boolean changeChoosingPlayer()
Change internally the player which can choose the RuleSet. (Often: Triggered by a Player who doesn't want to choose -> hand the choice over to another player)


canChangeChoosingPlayer

boolean canChangeChoosingPlayer()

getChoosingPlayer

int getChoosingPlayer()
Get the player which can choose the ruleSet for the next round

Returns:
The next choosing Player

getMultiplier

int getMultiplier(RuleSet rule)
Returns the multiplier of an activated RuleSet. The scores added by addScores() will be multiplied by this factor for the RuleSet. (initial multiplier is 1)

Parameters:
rule - The RuleSet of which the scores will be multiplied
Returns:
The Multiplier (int)

roundsPlayed

int roundsPlayed()

getWinningScore

int getWinningScore()


Copyright 2005 MA Software. All Rights Reserved.