public class HomeMatrix extends AbstractMatrix
Constructor and Description |
---|
HomeMatrix(ObjID objID,
Attributes attributes,
java.util.Map<ObjID,NetPuzlObject> cache)
This is the constructor for the HomeMatrix class that extends the
AbstractMatrix class this uses the default Matrix for now.
|
Modifier and Type | Method and Description |
---|---|
private java.awt.Color |
getRandomColor()
Gets a Color with a random red, green, blue, and alpha
|
private void |
loadColorToken(java.util.Map<ObjID,NetPuzlObject> cache)
This method loads a color token.
|
private void |
loadHeinekenMathToken(java.util.Map<ObjID,NetPuzlObject> cache)
This method loads a Heineken Math token.
|
private void |
loadHeinekenToken(java.util.Map<ObjID,NetPuzlObject> cache)
This method loads a Heineken token from cache.
|
private void |
loadHelpToken(java.util.Map<ObjID,NetPuzlObject> cache)
This method loads a help token.
|
private void |
loadPlayersToken(java.util.Map<ObjID,NetPuzlObject> cache)
This method loads players token.
|
private void |
loadPPToken(java.util.Map<ObjID,NetPuzlObject> cache)
This loads a pair panicking token.
|
private void |
loadTokens(java.util.Map<ObjID,NetPuzlObject> cache)
This method calls all the other load methods to generate this home
matrix.
|
private void |
setColorsOfNPO(NetPuzlObject npo,
java.awt.Color bgColor,
java.awt.Color fgColor)
This method sets the colors of a NetPuzlObject.
|
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
public HomeMatrix(ObjID objID, Attributes attributes, java.util.Map<ObjID,NetPuzlObject> cache)
objID
- The object ID to construct this Home Matrix withattributes
- The Attributes to construct this Home Matrix withcache
- The Map to cache this Home Matrix inprivate java.awt.Color getRandomColor()
private void loadColorToken(java.util.Map<ObjID,NetPuzlObject> cache)
cache
- The cache from where to retrieve the color token.private void loadHeinekenMathToken(java.util.Map<ObjID,NetPuzlObject> cache)
cache
- Where to retrieve the math token from.private void loadHeinekenToken(java.util.Map<ObjID,NetPuzlObject> cache)
cache
- Where to load from.private void loadHelpToken(java.util.Map<ObjID,NetPuzlObject> cache)
cache
- Where to load from.private void loadPlayersToken(java.util.Map<ObjID,NetPuzlObject> cache)
cache
- Where to load from.private void loadPPToken(java.util.Map<ObjID,NetPuzlObject> cache)
cache
- Where to load the token from.private void loadTokens(java.util.Map<ObjID,NetPuzlObject> cache)
cache
- Where to load from.private void setColorsOfNPO(NetPuzlObject npo, java.awt.Color bgColor, java.awt.Color fgColor)
npo
- The object that is being colored.bgColor
- The background color.fgColor
- The foreground color.