Holger's
Java API

com.antelmann.game.checkers
Class JCheckers

java.lang.Object
  extended by com.antelmann.game.JDefaultGame
      extended by com.antelmann.game.checkers.JCheckers
All Implemented Interfaces:
JGamePlay, ActionListener, EventListener

public class JCheckers
extends JDefaultGame
implements ActionListener

implements the GUI wrapper around CheckersGame to use with JGameFrame

Author:
Holger Antelmann

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
JCheckers()
           
JCheckers(CheckersGame 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
 String getStatusMessage()
          indicates the number of moves performed, number of legal moves available, and indicates if someone won the game.
 
Methods inherited from class com.antelmann.game.JDefaultGame
getAutoPlay, getDefaultFileExtension, getFileFilter, getNewGame, getTitle, setFileFilter, setGame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCheckers

public JCheckers()

JCheckers

public JCheckers(CheckersGame game,
                 Player player1,
                 Player player2,
                 int level)
Method Detail

getContainer

public Container getContainer(GameGUI frame)
Description copied from class: JDefaultGame
takes the toString() function of the GamePlay and turns it into formatted html, which is returned as a JLabel

Specified by:
getContainer in interface JGamePlay
Overrides:
getContainer in class JDefaultGame
Parameters:
frame - the object to be used to alter the game status by using the interface

getMenu

public JMenu getMenu()
Description copied from class: JDefaultGame
returns null if not overridden

Specified by:
getMenu in interface JGamePlay
Overrides:
getMenu in class JDefaultGame

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

getStatusMessage

public String getStatusMessage()
Description copied from class: JDefaultGame
indicates the number of moves performed, number of legal moves available, and indicates if someone won the game.

Specified by:
getStatusMessage in interface JGamePlay
Overrides:
getStatusMessage in class JDefaultGame

getHelp

public Container getHelp()
Description copied from class: JDefaultGame
returns null if not overridden

Specified by:
getHelp in interface JGamePlay
Overrides:
getHelp in class JDefaultGame


(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads