org.vizzini.game
Class DefaultAdjudicator

java.lang.Object
  extended by org.vizzini.game.AbstractAdjudicator
      extended by org.vizzini.game.DefaultAdjudicator
All Implemented Interfaces:
IAdjudicator

public class DefaultAdjudicator
extends AbstractAdjudicator

Provides a default implementation of an adjudicator. This class never signals game over or is goal, and any actions are legal.

Since:
v0.2
Version:
v0.2
Author:
Jeffrey M. Thompson

Field Summary
 
Fields inherited from class org.vizzini.game.AbstractAdjudicator
_winner
 
Constructor Summary
DefaultAdjudicator()
           
 
Method Summary
 boolean isActionLegal(IEnvironment environment, IAction action)
          Return true if the given action is legal in the given environment.
 boolean isGameOver(IEnvironment environment)
          Return true if the given environment represents a completed game.
 boolean isGoal(IEnvironment environment)
          Return true if one of the agents has won.
 
Methods inherited from class org.vizzini.game.AbstractAdjudicator
areActionsLegal, getWinner, reset, setWinner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAdjudicator

public DefaultAdjudicator()
Method Detail

isActionLegal

public boolean isActionLegal(IEnvironment environment,
                             IAction action)
Return true if the given action is legal in the given environment.

Parameters:
environment - The current environment.
Returns:
true if the given action is legal in the given environment.
Since:
v0.2

isGameOver

public boolean isGameOver(IEnvironment environment)
Return true if the given environment represents a completed game.

Parameters:
environment - The current environment.
Since:
v0.2

isGoal

public boolean isGoal(IEnvironment environment)
Return true if one of the agents has won. If no one has won, return false.

Since:
v0.2


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