|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrle.core.GameContextBase
rle.simple.SimpleGame
public class SimpleGame
The main class for the SimpleGame demo. For convenience, we implement GameContext. The SimpleGame class has four perspectives; welcome, game, victory and death. These are configured in the Variant Manager.
| Field Summary | |
|---|---|
protected javax.swing.Action |
actionCloseGame
|
protected javax.swing.Action |
actionExit
|
protected javax.swing.Action |
actionNewGame
|
protected javax.swing.Action |
actionOpenGame
|
protected javax.swing.Action |
actionSaveGame
|
static SimpleGame |
instance
|
| Fields inherited from class rle.core.GameContextBase |
|---|
commandSet, contextListeners, currentBoard, currentLanguage, currentPerspective, currentPlayer, data, gameClock, gameThread, messageQueue, playing, rootPaneContainer, schema, variant, world |
| Constructor Summary | |
|---|---|
SimpleGame()
|
|
SimpleGame(javax.swing.JApplet applet)
|
|
| Method Summary | |
|---|---|
void |
doCloseGame()
Close the current game. |
void |
doNewGame()
Start a new game. |
void |
doOpenGame()
Open an existing game. |
void |
doSaveGame()
Save the current game. |
static void |
main(java.lang.String[] args)
|
void |
setCommandSet(CommandSet commandSet)
Set the current command set. |
void |
setCurrentBoard(Board nextBoard)
Overridden to clean up old board and prepare new board. |
void |
setCurrentLanguage(java.lang.String s)
Overridden to change the frame title. |
void |
setCurrentPerspective(Perspective p)
Set the current Perspective, which controls the user experience. |
void |
setRootPaneContainer(javax.swing.RootPaneContainer rpc)
|
void |
showDeathPerspective()
|
void |
showGamePerspective()
Activate the game "perspective". |
void |
showVictoryPerspective()
|
void |
showWelcomePerspective()
Show the welcome screen. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static SimpleGame instance
protected javax.swing.Action actionNewGame
protected javax.swing.Action actionOpenGame
protected javax.swing.Action actionCloseGame
protected javax.swing.Action actionSaveGame
protected javax.swing.Action actionExit
| Constructor Detail |
|---|
public SimpleGame()
public SimpleGame(javax.swing.JApplet applet)
| Method Detail |
|---|
public void setRootPaneContainer(javax.swing.RootPaneContainer rpc)
setRootPaneContainer in class GameContextBasepublic static void main(java.lang.String[] args)
public void showWelcomePerspective()
public void setCurrentPerspective(Perspective p)
setCurrentPerspective in class GameContextBasepublic void showDeathPerspective()
public void showVictoryPerspective()
public void setCurrentBoard(Board nextBoard)
setCurrentBoard in class GameContextBasepublic void doNewGame()
public void doOpenGame()
public void doCloseGame()
public void doSaveGame()
public void showGamePerspective()
public void setCurrentLanguage(java.lang.String s)
setCurrentLanguage in class GameContextBases - public void setCommandSet(CommandSet commandSet)
setCommandSet in interface GameContextsetCommandSet in class GameContextBase
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||