org.vizzini.example.tictactoe
Class Adjudicator

java.lang.Object
  extended by org.vizzini.game.AbstractAdjudicator
      extended by org.vizzini.game.boardgame.AbstractGridBoardAdjudicator
          extended by org.vizzini.example.tictactoe.Adjudicator
All Implemented Interfaces:
IGridBoardAdjudicator, IAdjudicator

public class Adjudicator
extends AbstractGridBoardAdjudicator

Provides an adjudicator for tic-tac-toe.

Since:
v0.1
Version:
v0.3
Author:
Jeffrey M. Thompson

Field Summary
 
Fields inherited from class org.vizzini.game.AbstractAdjudicator
_winner
 
Constructor Summary
Adjudicator()
          Construct this object.
 
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 one of the agents has won, or there are no more open positions.
 boolean isGoal(IEnvironment environment)
          Return true if one of the agents has won.
 
Methods inherited from class org.vizzini.game.boardgame.AbstractGridBoardAdjudicator
agentHasLine, agentHasLineHelper, getWinningPositions
 
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
 
Methods inherited from interface org.vizzini.game.IAdjudicator
areActionsLegal, getWinner, reset, setWinner
 

Constructor Detail

Adjudicator

public Adjudicator()
Construct this object.

Since:
v0.2
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 environment of interest.
action - The action in question.
Returns:
true if the given action is legal in the given environment.
Since:
v0.1

isGameOver

public boolean isGameOver(IEnvironment environment)
Return true if one of the agents has won, or there are no more open positions.

Parameters:
environment - The environment of interest.
Since:
v0.1

isGoal

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

Parameters:
environment - The environment of interest.
Since:
v0.1


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02