|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.tabacha.cgo.AbstractEngine
de.tabacha.cgo.gui.HumanPlayer
The strategy is: The user makes the move.
Design pattern: routine strategy, move builder
$Id: HumanPlayer.java,v 1.16 2004/07/30 21:06:35 mk Exp $
| Field Summary |
| Fields inherited from interface de.tabacha.cgo.Constants |
BALL, COL_COUNT, DCOL, DOWN, DROW, E, EMPTY, FIRST_DIRECTION, KICK_OFF_FIELD, LAST_DIRECTION, N, NE, NW, OPPOSITE, PIECE, ROW_COUNT, S, SE, SW, UP, UPSIDEDOWN, W |
| Constructor Summary | |
HumanPlayer()
Constructor. |
|
HumanPlayer(BoardComponent editor)
Constructor. |
|
| Method Summary | |
boolean |
canPlayBothSides()
This default implementation always returns false. |
java.lang.String |
getVersion()
Returns the localized version of the version property. |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
setEditor(BoardComponent editor)
Sets the GUI object where moves are entered. |
Move |
think(Board position)
Registers this object to the editor as a mouse listener and waits until the move is completed. |
| Methods inherited from class de.tabacha.cgo.AbstractEngine |
getAuthor, getDescription, getI18nProperty, getName, initGame, random |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HumanPlayer(BoardComponent editor)
editor - The GUI object where moves are entered.public HumanPlayer()
| Method Detail |
public void setEditor(BoardComponent editor)
throws java.lang.IllegalStateException
java.lang.IllegalStateException - When changing the editor during an edit.public java.lang.String getVersion()
AbstractEngine
getVersion in interface EnginegetVersion in class AbstractEngineEngine.getVersion()public boolean canPlayBothSides()
AbstractEngine
canPlayBothSides in interface EnginecanPlayBothSides in class AbstractEngineEngine.canPlayBothSides()public Move think(Board position)
think in interface Engineposition - The actual position
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListener
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||