org.vizzini.ui.game.boardgame
Class PlacementMouseAgent

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

public class PlacementMouseAgent
extends AbstractHumanAgent
implements MouseListener

Provides a user interface for a human agent which uses the mouse to place a token.

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

Field Summary
protected  StatusManager _statusManager
          Status manager.
 
Fields inherited from interface org.vizzini.game.IAgent
NAME_PROPERTY, TEAM_PROPERTY
 
Constructor Summary
PlacementMouseAgent()
           
 
Method Summary
 void addStatusListener(IStatusListener listener)
          Add a status listener.
protected  IAction createAction(IEnvironment environment)
          Create the appropriate action.
 IAction getAction(IEnvironment environment, IAdjudicator adjudicator)
          Return the action determined through consideration of the given environment and the given adjudicator.
protected  StatusManager getStatusManager()
          Return the status manager.
 void mouseClicked(MouseEvent event)
          Implement the mouse listener inteface.
 void mouseEntered(MouseEvent event)
          Implement the mouse listener inteface.
 void mouseExited(MouseEvent event)
          Implement the mouse listener inteface.
 void mousePressed(MouseEvent event)
          Implement the mouse listener inteface.
 void mouseReleased(MouseEvent event)
          Implement the mouse listener inteface.
 
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, reset, 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, getName, getScore, getTeam, getTokenCollection, incrementScore, removeConcedeListener, removePropertyChangeListener, removeScoreListener, reset, setName, setScore, setTeam
 

Field Detail

_statusManager

protected transient StatusManager _statusManager
Status manager.

Constructor Detail

PlacementMouseAgent

public PlacementMouseAgent()
Method Detail

addStatusListener

public void addStatusListener(IStatusListener listener)
Add a status listener.

Since:
v0.1

getAction

public IAction getAction(IEnvironment environment,
                         IAdjudicator adjudicator)
Return the action determined through consideration of the given environment and the given adjudicator.

Specified by:
getAction in interface IAgent
Parameters:
environment - The current environment.
adjudicator - The adjudicator.
Since:
v0.1

mouseClicked

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

Specified by:
mouseClicked in interface MouseListener
Parameters:
event - A mouse event.
Since:
v0.1

mouseEntered

public void mouseEntered(MouseEvent event)
Implement the mouse listener inteface.

Specified by:
mouseEntered in interface MouseListener
Parameters:
event - A mouse event.
Since:
v0.1

mouseExited

public void mouseExited(MouseEvent event)
Implement the mouse listener inteface.

Specified by:
mouseExited in interface MouseListener
Parameters:
event - A mouse event.
Since:
v0.1

mousePressed

public void mousePressed(MouseEvent event)
Implement the mouse listener inteface.

Specified by:
mousePressed in interface MouseListener
Parameters:
event - A mouse event.
Since:
v0.1

mouseReleased

public void mouseReleased(MouseEvent event)
Implement the mouse listener inteface.

Specified by:
mouseReleased in interface MouseListener
Parameters:
event - A mouse event.
Since:
v0.1

createAction

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

Since:
v0.1

getStatusManager

protected StatusManager getStatusManager()
Return the status manager.

Since:
v0.1


Copyright © 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02