public class HeinekenMatrix extends AbstractHeinekenGame
Modifier and Type | Field and Description |
---|---|
private Image |
bottleImage
The Image of the clickable Heineken bottle button
|
private Token |
clickableToken
The clickable Heineken bottle in this Heineken Matrix game
|
private Image |
grassImage
The Image of each of the 63 background buttons
|
private java.util.List<Token> |
hListTokens
The 63 background buttons of this Heineken Matrix game
|
private java.util.Timer |
timer
The Timer that schedules a swap of the Heineken bottle Image and a
background image
|
Constructor and Description |
---|
HeinekenMatrix(ObjID objID,
Attributes attributes,
java.util.Map<ObjID,NetPuzlObject> cache)
Constructs a Heineken Matrix game with the given parameters
|
Modifier and Type | Method and Description |
---|---|
private void |
activateGameTokens()
Enables all game Tokens and starts the Heineken bottle moving
|
private void |
gameNotActiveYet(Agent agent,
Token token)
What a game button says when clicked on while the game is inactive
|
void |
loadHeinekenTokens()
Loads all game Tokens and sets them to inactive status
|
private void |
loadHelpToken()
Loads the 'Help' button of this Heineken Matrix
|
private void |
loadHomeToken()
Loads the 'Home' button of this Heineken Matrix
|
private void |
loadMiscTokens()
Loads the 'Home', 'Help', 'Status', and 'Start' buttons of this Heineken
Matrix
|
private void |
loadStartToken()
Loads the 'Start' button of the button of this Heineken Matrix
|
private void |
moveClickableToken()
Swaps the Heineken bottle Token's name, text, and Image Attributes with a
random background Token's Attributes
|
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> hListTokens
private Token clickableToken
private java.util.Timer timer
private Image grassImage
private Image bottleImage
public HeinekenMatrix(ObjID objID, Attributes attributes, java.util.Map<ObjID,NetPuzlObject> cache)
objID
- The object ID to construct this Heineken Matrix game withattributes
- The Attributes to construct this Heineken Matrix game
withcache
- The Map to cache this Heineken Matrix game inprivate void loadMiscTokens()
private void loadHomeToken()
private void loadHelpToken()
private void loadStartToken()
private void activateGameTokens()
public void loadHeinekenTokens()
private void gameNotActiveYet(Agent agent, Token token)
agent
- The Agent interacting with the game buttontoken
- The game button clicked onprivate void moveClickableToken()