|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.computing.game.AbstractGame
org.jscience.computing.game.awari.AwariGame
public class AwariGame
AwariGame implements an ancient African game (for all I know). The board positions are configured as follows:
13 12 11 10 9 8 0 7 1 2 3 4 5 6
| Constructor Summary | |
|---|---|
AwariGame()
Creates a new AwariGame object. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
DOCUMENT ME! |
int |
getBaseCount(int player)
DOCUMENT ME! |
double |
getLead(int playerRole)
returns the lead as in difference in number of pegs during the game |
double |
getResult(int playerRole)
returns the difference in number of pegs once the game is over |
int[] |
getWinner()
if the game is even, all players win |
protected GameMove[] |
listLegalMoves()
DOCUMENT ME! |
int |
nextPlayer()
DOCUMENT ME! |
protected boolean |
popMove()
DOCUMENT ME! |
protected boolean |
pushMove(GameMove move)
DOCUMENT ME! |
java.lang.String |
toString()
DOCUMENT ME! |
| Methods inherited from class org.jscience.computing.game.AbstractGame |
|---|
clearRedoList, gameOver, getGameName, getLastMove, getLastPlayer, getLegalMoves, getLegalMoves, getMoveHistory, getNumberOfRedoMoves, getRedoList, isLegalMove, isWinner, loadFromFile, makeMove, numberOfMoves, numberOfPlayers, redoMove, resetLegalMoves, resetLists, saveToFile, spawnChild, undoLastMove, undoMoves |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AwariGame()
| Method Detail |
|---|
protected GameMove[] listLegalMoves()
listLegalMoves in class AbstractGameprotected boolean pushMove(GameMove move)
pushMove in class AbstractGamemove - DOCUMENT ME!
protected boolean popMove()
popMove in class AbstractGamepublic int nextPlayer()
public int[] getWinner()
public double getResult(int playerRole)
throws GameRuntimeException
getResult in interface GamePlaygetResult in class AbstractGameplayerRole - DOCUMENT ME!
GameRuntimeException - DOCUMENT ME!public double getLead(int playerRole)
playerRole - DOCUMENT ME!
public int getBaseCount(int player)
player - DOCUMENT ME!
public java.lang.String toString()
toString in class AbstractGame
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface GamePlayclone in class AbstractGamejava.lang.CloneNotSupportedException - DOCUMENT ME!AbstractGame.spawnChild(GameMove)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||