org.vizzini.ui.game.boardgame.chess
Class MouseAgent

java.lang.Object
  extended by org.vizzini.game.AbstractAgent
      extended by org.vizzini.game.AbstractHumanAgent
          extended by org.vizzini.ui.game.boardgame.MovementMouseAgent
              extended by org.vizzini.ui.game.boardgame.chess.MouseAgent
All Implemented Interfaces:
MouseListener, Serializable, EventListener, IChessAgent, IAgent, IHumanAgent

public class MouseAgent
extends MovementMouseAgent
implements IChessAgent

Provides a text agent for 3D chess.

Since:
v0.3
Version:
v0.3
Author:
Jeffrey M. Thompson
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.vizzini.ui.game.boardgame.MovementMouseAgent
_desiredPositionCount, _positions, _statusManager
 
Fields inherited from interface org.vizzini.game.IAgent
NAME_PROPERTY, TEAM_PROPERTY
 
Constructor Summary
MouseAgent()
           
 
Method Summary
protected  IAction createAction(IEnvironment environment)
          Create the appropriate action.
 Class getPawnPromotionType()
          Return the pawn promotion type.
 boolean isPawnPrompt()
          Return true if this agent should prompt for the pawn promotion type.
 boolean isWhite()
          Return true if this agent's team is white.
 void mouseClicked(MouseEvent event)
          Implement the mouse listener interface.
 void reset()
          Reset to the initial state.
static void setFrame(Frame frame)
          Set the frame.
 void setPawnPrompt(boolean isPawnPrompt)
          Set the flag indicating whether to prompt for the pawn promotion type.
 
Methods inherited from class org.vizzini.ui.game.boardgame.MovementMouseAgent
addStatusListener, getAction, getStatusManager, mouseEntered, mouseExited, mousePressed, mouseReleased, setDesiredPositionCount
 
Methods inherited from class org.vizzini.game.AbstractHumanAgent
beep
 
Methods inherited from class org.vizzini.game.AbstractAgent
addConcedeListener, addPropertyChangeListener, addScoreListener, addToScore, concede, configure, equals, getConcedeManager, getIndex, getName, getProperties, getPropertyChangeManager, getScore, getScoreManager, getTeam, getTokenCollection, getTokenCollectionClass, hashCode, incrementScore, removeConcedeListener, removePropertyChangeListener, removeScoreListener, setName, setScore, setTeam, setTokenCollectionClass, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.vizzini.game.IAgent
addConcedeListener, addPropertyChangeListener, addScoreListener, addToScore, concede, configure, getAction, getName, getScore, getTeam, getTokenCollection, incrementScore, removeConcedeListener, removePropertyChangeListener, removeScoreListener, setName, setScore, setTeam
 

Constructor Detail

MouseAgent

public MouseAgent()
Method Detail

setFrame

public static void setFrame(Frame frame)
Set the frame.

Since:
v0.3

getPawnPromotionType

public Class getPawnPromotionType()
Return the pawn promotion type.

Specified by:
getPawnPromotionType in interface IChessAgent
Since:
v0.3

isPawnPrompt

public boolean isPawnPrompt()
Return true if this agent should prompt for the pawn promotion type.

Specified by:
isPawnPrompt in interface IChessAgent
Since:
v0.3

isWhite

public boolean isWhite()
Return true if this agent's team is white.

Specified by:
isWhite in interface IChessAgent
Since:
v0.3

mouseClicked

public void mouseClicked(MouseEvent event)
Implement the mouse listener interface.

Specified by:
mouseClicked in interface MouseListener
Overrides:
mouseClicked in class MovementMouseAgent
Parameters:
event - A mouse event.
Since:
v0.3

reset

public void reset()
Reset to the initial state.

Specified by:
reset in interface IAgent
Overrides:
reset in class MovementMouseAgent
Since:
v0.3

setPawnPrompt

public void setPawnPrompt(boolean isPawnPrompt)
Set the flag indicating whether to prompt for the pawn promotion type.

Specified by:
setPawnPrompt in interface IChessAgent
Since:
v0.3

createAction

protected IAction createAction(IEnvironment environment)
Create the appropriate action.

Overrides:
createAction in class MovementMouseAgent
Since:
v0.3


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02