java.lang.Objectedu.kzoo.grid.GridObject
BingoValueCell
public class BingoValueCell
Bingo Game:
A BingoValueCell is a cell containing text (a column heading or the string
version of a number that can be played); the color can be changed when
the value in the cell is played.
Constructor Summary | |
---|---|
BingoValueCell(int value,
java.awt.Color textColor)
Constructor for objects of class BingoValueCell. |
|
BingoValueCell(java.lang.String value,
java.awt.Color textColor)
Constructor for objects of class BingoValueCell. |
Method Summary | |
---|---|
void |
changeColor(java.awt.Color newColor)
Changes the color of the value in this cell to newColor. |
java.awt.Color |
color()
Gets color of value in this cell. |
java.lang.String |
text()
Gets the value in this cell as a String. |
boolean |
textEqualsValue(int value)
Returns true if the text in this cell is equivalent
to the formatted string version of the given value ;
returns false otherwise. |
Methods inherited from class edu.kzoo.grid.GridObject |
---|
act, addToGrid, changeLocation, grid, isInAGrid, location, removeFromGrid, theGridObjectInvariantHolds, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BingoValueCell(int value, java.awt.Color textColor)
public BingoValueCell(java.lang.String value, java.awt.Color textColor)
Method Detail |
---|
public void changeColor(java.awt.Color newColor)
public java.awt.Color color()
public java.lang.String text()
public boolean textEqualsValue(int value)
true
if the text in this cell is equivalent
to the formatted string version of the given value
;
returns false
otherwise.