org.vizzini.example.gin.ui
Class MouseHumanAgent

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

public class MouseHumanAgent
extends AbstractHumanAgent
implements MouseListener

Provides a human agent for Gin which uses the mouse to get commands.

Since:
v0.1
Version:
v0.2
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
MouseHumanAgent()
           
 
Method Summary
 void addStatusListener(IStatusListener listener)
          Add a status listener.
protected  IAction createAction(IEnvironment environment0)
          Create the appropriate action.
 IAction getAction(IEnvironment environment, IAdjudicator adjudicator)
          Return the action determined through consideration of the given environment using 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

MouseHumanAgent

public MouseHumanAgent()
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 using the given adjudicator.

Specified by:
getAction in interface IAgent
Parameters:
environment - The current environment.
adjudicator - Adjudicator for determining legal actions.
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 environment0)
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