|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.eclipse.lifegame.domain.Game
| Constructor Summary | |
Game()
Default constructor for Game. |
|
| Method Summary | |
void |
addToHistory(Board aBoard)
Add aBoard to the game's board history. |
void |
clearHistory()
Removes receiver's history, clears the collection of boards. |
Board |
getBoard()
Return receiver's board. |
java.util.ArrayList |
getBoardHistory()
Return collection of boards, a history. |
int |
getGeneration()
Return generations for teh game. |
Rule[] |
getRules()
Return game rules. |
void |
loadBoardFromFile(java.lang.String filename)
Loads receiver's board from a given file and assigns it to the receiver. |
void |
printHistory()
Prints receiver's board history to standard output. |
void |
run()
Runs the game. |
void |
saveCurrentBoardToFile(java.lang.String filename)
Saves receiver's board to a given file. |
void |
setBoard(Board board)
Set the receiver's board. |
void |
setBoardHistory(java.util.ArrayList list)
Set game's board history. |
void |
setGeneration(int i)
Set game's generations. |
void |
setRules(Rule[] rules)
Set the game rules. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Game()
| Method Detail |
public Board getBoard()
public void setBoard(Board board)
an - instance of Board classpublic Rule[] getRules()
public void setRules(Rule[] rules)
an - array of Rule objectspublic void run()
public int getGeneration()
public void setGeneration(int i)
i, - integerpublic java.util.ArrayList getBoardHistory()
public void setBoardHistory(java.util.ArrayList list)
list - collection of boardspublic void addToHistory(Board aBoard)
an - instance of Board classpublic void clearHistory()
public void printHistory()
public void saveCurrentBoardToFile(java.lang.String filename)
public void loadBoardFromFile(java.lang.String filename)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||