org.eclipse.palamedes.gdl.core.resolver.prologprover
Class ReasonerAdapter

java.lang.Object
  extended by org.eclipse.palamedes.gdl.core.resolver.prologprover.ReasonerAdapter
All Implemented Interfaces:
IReasoner

public final class ReasonerAdapter
extends java.lang.Object
implements IReasoner


Constructor Summary
ReasonerAdapter(java.lang.String gameDescription)
           
 
Method Summary
 IFluent createFluent(java.lang.String fluentStr)
          This method should return a valid FluentAdapter for this reasoner.
 IMove createMove(java.lang.String moveStr)
          This method should return a valid MoveAdapter for this reasoner.
 int getGoalValue(java.lang.String roleName, IGameState gameState)
          Returns a value between 0 - 100 if a goal value exists; otherwise -1.
 IGameState getInitialState()
           
 IMove[] getLegalMoves(java.lang.String roleName, IGameState gameState)
          Returns the legal moves for a specified role.
 IGameState getNextState(IGameState currentState, IMove[] moves)
          Returns the next state for a given parent state and specified moves.
 java.lang.String[] getRoleNames()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReasonerAdapter

public ReasonerAdapter(java.lang.String gameDescription)
Method Detail

createFluent

public IFluent createFluent(java.lang.String fluentStr)
Description copied from interface: IReasoner
This method should return a valid FluentAdapter for this reasoner.

Specified by:
createFluent in interface IReasoner

createMove

public IMove createMove(java.lang.String moveStr)
Description copied from interface: IReasoner
This method should return a valid MoveAdapter for this reasoner. String should contain "(does )"

Specified by:
createMove in interface IReasoner

getGoalValue

public int getGoalValue(java.lang.String roleName,
                        IGameState gameState)
                 throws java.lang.InterruptedException
Description copied from interface: IReasoner
Returns a value between 0 - 100 if a goal value exists; otherwise -1.

Specified by:
getGoalValue in interface IReasoner
Throws:
java.lang.InterruptedException

getLegalMoves

public IMove[] getLegalMoves(java.lang.String roleName,
                             IGameState gameState)
                      throws java.lang.InterruptedException
Description copied from interface: IReasoner
Returns the legal moves for a specified role.

Specified by:
getLegalMoves in interface IReasoner
Throws:
java.lang.InterruptedException

getNextState

public IGameState getNextState(IGameState currentState,
                               IMove[] moves)
                        throws java.lang.InterruptedException
Description copied from interface: IReasoner
Returns the next state for a given parent state and specified moves.

Specified by:
getNextState in interface IReasoner
Throws:
java.lang.InterruptedException

getInitialState

public IGameState getInitialState()

getRoleNames

public java.lang.String[] getRoleNames()