|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IGridBoard
Defines methods required by grid board environments in the game framework.
Method Summary | |
---|---|
int |
agentTokenCount(IAgent agent,
int startF,
int startR,
int startL,
int df,
int dr,
int dl)
Return the number of token's the given agent has in the line specified by the other arguments. |
int |
coordsToIndex(int file,
int rank,
int level)
Return the index computed from the given parameters. |
IToken |
get(int file,
int rank,
int level)
Return the token at the given position. |
int |
getCellCount()
Return the cell count. |
int |
getFileCount()
Return the file count. |
IAgent |
getLastAgent()
Return the last agent who performed an action. |
int |
getLevelCount()
Return the level count. |
int |
getMaxDimension()
Return the maximum of the file, rank, and level counts. |
int |
getRankCount()
Return the rank count. |
int |
indexToFile(int index)
Return the file coordinates computed from the given index. |
int |
indexToLevel(int index)
Return the level coordinates computed from the given index. |
IntegerPosition |
indexToPosition(int index)
Return the position computed from the given index. |
int |
indexToRank(int index)
Return the rank coordinates computed from the given index. |
boolean |
is3D()
Return true if this is using 3D coordinates. |
boolean |
isActionHistoryUsed()
|
boolean |
isPositionUsable(IntegerPosition position)
Return true if the given position is usable. |
boolean |
isPositionUsable(int file,
int rank,
int level)
Return true if the given position is usable. |
boolean |
isRedoAllowed()
Return true if a redo action is allowed. |
boolean |
isUndoAllowed()
Return true if an undo action is allowed. |
int |
positionToIndex(IntegerPosition position)
Return the index computed from the given position. |
void |
setActionHistoryUsed(boolean isActionHistoryUsed)
|
void |
setToken(IntegerPosition position,
IToken token)
Set the token at the given position. |
void |
setToken(int file,
int rank,
int level,
IToken token)
Set the token at the given position. |
Methods inherited from interface org.vizzini.game.IEnvironment |
---|
addStateListener, clone, configure, copy, get, getAdjudicator, getAgentCollection, getTeamCollection, getTokenCollection, getTurnNumber, incrementTurnNumber, isFiringStateChanges, open, performAction, performActions, removeStateListener, reset, setAdjudicator, setAgentCollection, setFiringStateChanges, setTurnNumber, undoAction, update |
Method Detail |
---|
boolean isActionHistoryUsed()
int agentTokenCount(IAgent agent, int startF, int startR, int startL, int df, int dr, int dl)
agent
- Agent 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.int coordsToIndex(int file, int rank, int level)
file
- File.rank
- Rank.level
- Level.
IToken get(int file, int rank, int level)
int getCellCount()
int getFileCount()
IAgent getLastAgent()
int getLevelCount()
int getMaxDimension()
int getRankCount()
int indexToFile(int index)
index
- Index.int indexToLevel(int index)
index
- Index.IntegerPosition indexToPosition(int index)
index
- Index.int indexToRank(int index)
index
- Index.boolean is3D()
boolean isPositionUsable(IntegerPosition position)
boolean isPositionUsable(int file, int rank, int level)
boolean isRedoAllowed()
boolean isUndoAllowed()
int positionToIndex(IntegerPosition position)
position
- Position.void setActionHistoryUsed(boolean isActionHistoryUsed)
isActionHistoryUsed
- The isActionHistoryUsed to set.void setToken(IntegerPosition position, IToken token)
position
- Position.token
- Token.void setToken(int file, int rank, int level, IToken token)
file
- File.rank
- Rank.level
- Level.token
- Token.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |