public class PairPanickingMatrix extends AbstractHeinekenGame
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.lang.String> |
availableSymbols
The unused symbols of this PairPanicking game
|
private java.util.Map<java.lang.String,Image> |
beers
The table that links each symbol with a beer image
|
private java.util.List<Token> |
gameTokens
The 64 game buttons of this PairPanicking game
|
private boolean |
imgSupport
Whether or not this game of PairPanicking is using images
|
private Token |
showing
The game button that is showing during 'SHOW1' game status
|
private java.util.Map<Token,java.lang.String> |
symbolTable
The table that links each game button with a symbol
|
Constructor and Description |
---|
PairPanickingMatrix(ObjID objID,
Attributes attributes,
java.util.Map<ObjID,NetPuzlObject> cache)
Constructs a PairPanicking game with the given parameters
|
Modifier and Type | Method and Description |
---|---|
private void |
fillAvailableSymbols()
Store this PairPanicking game's unused Symbols
|
private void |
fillSymbolTable()
Link game Tokens to a random symbol that has been used less than four
times and send the appropriate set tags to clients in this game
|
private void |
loadHelpToken()
Load this PairPanicking game's 'Help' button
|
private void |
loadHomeToken()
Loads the 'Home' button of this PairPanicking game
|
private void |
loadImages()
Loads the beer Images to be used as symbols and links them with an
Integer
|
private void |
loadMiscTokens()
Loads the 'Home', 'Help', 'Status', and 'Start' buttons of this
PairPanicking game
|
private void |
loadPPTokens()
Loads the game Tokens with initial beer Images that will be removed when
the game starts
|
private void |
loadStartToken()
Loads the 'Start' button of this PairPanicking game
|
private void |
setTokenTo(Token token,
java.lang.String name,
int energy,
boolean displayImg)
Sets a game Token to the given parameters
|
private void |
setTokenToHidden(Token token)
Sets a game Token to hidden status
|
private void |
setTokenToShowing(Token token)
Sets a game Token to showing status
|
private void |
setTokenToSolved(Token token)
Sets a game Token to solved status
|
gameOver, getCache, getGameStatus, getNumSolved, getStartToken, getStatusToken, isReady, loadStatusToken, setAgentEnergy, setGameStatus, setNumSolved, setStartToken, setStatus, setStatusToken
addAgent, addKey, addToken, clearAgents, clearKeys, clearTokens, contains, containsImage, containsToken, createSetTag, createSetTags, createTokenSetTags, doSpokenCommand, fullToString, getAgentCount, getAgentIterator, getAgents, getGrid, getGridCell, getHeight, getImageCount, getKeyCount, getKeyIterator, getSayFunction, getThis, getTokenCount, getTokens, getWidth, hasSpokenCommand, initCells, removeAgent, removeKey, removeToken, sendHearTagToMatrix, sendHearTagToNPO, sendToAgentsInMatrix, setGrid, setGridCell, setSayFunction, toString
getAttributes, getObjID, setAttributes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAttributes, getObjID
private java.util.List<Token> gameTokens
private java.util.List<java.lang.String> availableSymbols
private java.util.Map<Token,java.lang.String> symbolTable
private java.util.Map<java.lang.String,Image> beers
private boolean imgSupport
private Token showing
public PairPanickingMatrix(ObjID objID, Attributes attributes, java.util.Map<ObjID,NetPuzlObject> cache)
objID
- The object ID to construct this PairPanicking game withattributes
- The Attributes to construct this PairPanicking game
withcache
- The Map to cache this PairPanicking game inprivate void fillAvailableSymbols()
private void fillSymbolTable()
private void loadHelpToken()
private void loadHomeToken()
private void loadImages()
private void loadMiscTokens()
private void loadPPTokens()
private void loadStartToken()
private void setTokenTo(Token token, java.lang.String name, int energy, boolean displayImg)
token
- The Token whose Attributes to setname
- The name to set the Token toenergy
- The energy to set the Token todisplayImg
- True if setting the Token's Image, false otherwiseprivate void setTokenToHidden(Token token)
token
- The Token to set to hidden statusprivate void setTokenToShowing(Token token)
token
- The Token to set to showing statusprivate void setTokenToSolved(Token token)
token
- The Token to set to solved status