public class ColorBlock extends GridObject
ColorBlock object encapsulates a color for a colored
cell in a grid.| Constructor and Description |
|---|
ColorBlock(java.awt.Color colorValue)
Constructs a color block with the specified color.
|
ColorBlock(java.awt.Color colorValue,
Grid grid,
Location loc)
Constructs a color block with the specified color.
|
| Modifier and Type | Method and Description |
|---|---|
java.awt.Color |
color()
Gets color value for color block.
|
java.lang.String |
toString()
Returns a string representation of the color.
|
act, addToGrid, changeLocation, grid, isInAGrid, location, removeFromGrid, theGridObjectInvariantHoldspublic ColorBlock(java.awt.Color colorValue)
colorValue - the color that fills this color blockpublic java.awt.Color color()
public java.lang.String toString()
toString in class GridObject