|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjagafa.scores.AbstractScoreTable
public abstract class AbstractScoreTable
| Field Summary | |
|---|---|
protected int |
choosingPlayer_
|
| Constructor Summary | |
|---|---|
AbstractScoreTable()
|
|
| 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()
Does nothing by default |
void |
deactivateRule(RuleSet rule)
Deactivate a 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 |
boolean |
isRuleAvailable(RuleSet rule)
|
void |
resetScores()
Reset all scores to 0 |
int |
roundsPlayed()
|
protected void |
setCanChangePlayer(boolean canChange)
|
protected void |
setChoosingPlayer(int i)
|
void |
setStartPlayer(int pindex)
Set the player which can start the next round |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jagafa.scores.ScoreTable |
|---|
getChoosingPlayer, getMultiplier, getWinningScore, isGameOver |
| Field Detail |
|---|
protected int choosingPlayer_
| Constructor Detail |
|---|
public AbstractScoreTable()
| Method Detail |
|---|
public boolean isRuleAvailable(RuleSet rule)
isRuleAvailable in interface ScoreTablepublic void activateRule(RuleSet rule)
ScoreTable
activateRule in interface ScoreTablepublic void deactivateRule(RuleSet rule)
ScoreTable
deactivateRule in interface ScoreTablepublic java.util.List<RuleSet> getRules()
ScoreTable
getRules in interface ScoreTable
public void addScores(int[] scores,
RuleSet rules)
ScoreTable
addScores in interface ScoreTablepublic int[] getScores()
ScoreTable
getScores in interface ScoreTablepublic int getStartPlayer()
ScoreTable
getStartPlayer in interface ScoreTablepublic void setStartPlayer(int pindex)
ScoreTable
setStartPlayer in interface ScoreTablepublic void resetScores()
ScoreTable
resetScores in interface ScoreTableprotected void setChoosingPlayer(int i)
public int roundsPlayed()
roundsPlayed in interface ScoreTablepublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean changeChoosingPlayer()
changeChoosingPlayer in interface ScoreTablepublic boolean canChangeChoosingPlayer()
canChangeChoosingPlayer in interface ScoreTableprotected void setCanChangePlayer(boolean canChange)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||