org.vizzini.game.boardgame
Class AbstractGridBoardAdjudicator
java.lang.Object
org.vizzini.game.AbstractAdjudicator
org.vizzini.game.boardgame.AbstractGridBoardAdjudicator
- All Implemented Interfaces:
- IGridBoardAdjudicator, IAdjudicator
- Direct Known Subclasses:
- Adjudicator, Adjudicator
public abstract class AbstractGridBoardAdjudicator
- extends AbstractAdjudicator
- implements IGridBoardAdjudicator
Provides base functionality for grid board adjudicators in the game
framework.
- Since:
- v0.2
- Version:
- v0.2
- Author:
- Jeffrey M. Thompson
Method Summary |
boolean |
agentHasLine(IEnvironment environment,
IAgent agent0,
IAgent agent1,
int startF,
int startR,
int startL,
int df,
int dr,
int dl)
Return true if an agent has tokens in the line specified by the other
arguments. |
boolean |
agentHasLineHelper(IGridBoard board,
IAgent agent,
int startF,
int startR,
int startL,
int df,
int dr,
int dl)
Return true if an agent has tokens in the line specified by the other
arguments. |
Set |
getWinningPositions()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractGridBoardAdjudicator
public AbstractGridBoardAdjudicator()
agentHasLine
public boolean agentHasLine(IEnvironment environment,
IAgent agent0,
IAgent agent1,
int startF,
int startR,
int startL,
int df,
int dr,
int dl)
- Return true if an agent has tokens in the line specified by the other
arguments.
- Specified by:
agentHasLine
in interface IGridBoardAdjudicator
- Parameters:
environment
- Environment of interest.startF
- Starting file.startR
- Starting rank.startL
- Starting level.df
- Delta in the file direction.dr
- Delta in the rank direction.dl
- Delta in the level direction.agent0
- First agent.agent1
- Second agent.- Since:
- v0.2
agentHasLineHelper
public boolean agentHasLineHelper(IGridBoard board,
IAgent agent,
int startF,
int startR,
int startL,
int df,
int dr,
int dl)
- Return true if an agent has tokens in the line specified by the other
arguments.
- Parameters:
board
- Board of interest.startF
- Starting file.startR
- Starting rank.startL
- Starting level.df
- Delta in the file direction.dr
- Delta in the rank direction.dl
- Delta in the level direction.- Since:
- v0.2
getWinningPositions
public Set getWinningPositions()
- Specified by:
getWinningPositions
in interface IGridBoardAdjudicator
- Returns:
- Return winningPositions.
Copyright © 2007 Vizzini.org. All Rights Reserved.
|
2007.12.25.03.00.02 |