|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.game.JDefaultGame
com.antelmann.game.fourwins.JFourWins
public class JFourWins
JFourWins provides the GUI wrapping for a FourWinsGame to be played with a JGameFrame
FourWinsGame,
JGameFrame| Field Summary |
|---|
| Fields inherited from class com.antelmann.game.JDefaultGame |
|---|
filter, frame, play |
| Fields inherited from interface com.antelmann.game.JGamePlay |
|---|
gameFrameX, gameFrameY, historyFrameX, historyFrameY, legalMovesFrameX, legalMovesFrameY, prototypeCellValue, redoFrameX, redoFrameY, windowHeight, windowLocationX, windowLocationY, windowWidth |
| Constructor Summary | |
|---|---|
JFourWins()
|
|
JFourWins(FourWinsGame game,
Player player1,
Player player2,
int level)
|
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
|
Container |
getContainer(GameGUI frame)
takes the toString() function of the GamePlay and turns it into formatted html, which is returned as a JLabel |
Container |
getHelp()
returns null if not overridden |
JMenu |
getMenu()
returns null if not overridden |
JGamePlay |
getNewGame()
depends on a default constructor being accessible for the GamePlay object in question |
String |
getStatusMessage()
indicates the number of moves performed, number of legal moves available, and indicates if someone won the game. |
String |
getTitle()
returns getGameName() from the GamePlay object |
| Methods inherited from class com.antelmann.game.JDefaultGame |
|---|
getAutoPlay, getDefaultFileExtension, getFileFilter, setFileFilter, setGame |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JFourWins()
public JFourWins(FourWinsGame game,
Player player1,
Player player2,
int level)
| Method Detail |
|---|
public String getTitle()
JDefaultGame
getTitle in interface JGamePlaygetTitle in class JDefaultGameGamePlay.getGameName()public Container getContainer(GameGUI frame)
JDefaultGame
getContainer in interface JGamePlaygetContainer in class JDefaultGameframe - the object to be used to alter the game status
by using the interfacepublic JGamePlay getNewGame()
JDefaultGame
getNewGame in interface JGamePlaygetNewGame in class JDefaultGamepublic JMenu getMenu()
JDefaultGame
getMenu in interface JGamePlaygetMenu in class JDefaultGamepublic String getStatusMessage()
JDefaultGame
getStatusMessage in interface JGamePlaygetStatusMessage in class JDefaultGamepublic void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic Container getHelp()
JDefaultGame
getHelp in interface JGamePlaygetHelp in class JDefaultGame
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||