org.vizzini.example.qubic
Class Adjudicator
java.lang.Object
org.vizzini.game.AbstractAdjudicator
org.vizzini.game.boardgame.AbstractGridBoardAdjudicator
org.vizzini.example.qubic.Adjudicator
- All Implemented Interfaces:
- IGridBoardAdjudicator, IAdjudicator
public class Adjudicator
- extends AbstractGridBoardAdjudicator
Provides an adjudicator for Qubic.
- Since:
- v0.2
- Version:
- v0.3
- Author:
- Jeffrey M. Thompson
Constructor Summary |
Adjudicator()
Construct this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Adjudicator
public Adjudicator()
- Construct this object.
- Since:
- v0.2
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.2
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.2
isGoal
public boolean isGoal(IEnvironment environment)
- Return true if one of the agents has won. If no one has won, return
false.
There are 76 ways to win:
4x4 file lines
4x4 rank lines
4x4 level lines
2x3x4 diagonal lines
4 triagonal lines
or
nxnx3 + 2x3xn + 4
- Parameters:
environment
- The environment of interest.- Since:
- v0.2
Copyright © 2007 Vizzini.org. All Rights Reserved.
|
2007.12.25.03.00.02 |