heurgame.event.turn
Interface TokenBased
- All Known Implementing Classes:
- AbstractTokenBasedIterator
- public interface TokenBased
- Author:
- David Kaplin
This Iterface may need to change.
The actions defined are common to TokenBased Iterators, this
does allow some code reuse between RoundRobinIterator and
the SecondChanceRRIterator. It is quite possible there
will be some other iterators it can help as well.
Method Summary |
PlayerToken |
getCurrentToken()
|
void |
setup(int totalRounds,
java.util.Vector pTokens)
Called after construction by the Game itself, to initialize
the TokenBased Iterator |
void |
updateActiveTokens(java.util.Vector newTokens)
Events specific to a game may occur that would force
the active tokens to change for the next round. |
setup
public void setup(int totalRounds,
java.util.Vector pTokens)
- Called after construction by the Game itself, to initialize
the TokenBased Iterator
- Parameters:
totalRounds
- The number of desired rounds for the IteratorpTokens
- The Tokens of the players
updateActiveTokens
public void updateActiveTokens(java.util.Vector newTokens)
- Events specific to a game may occur that would force
the active tokens to change for the next round. This
method allows this change.
- Parameters:
newTokens
- Exact order of tokens for the next round.
getCurrentToken
public PlayerToken getCurrentToken()
- Returns:
- The player token of the current turn's player