Class BingoValueCell

java.lang.Object
  extended by edu.kzoo.grid.GridObject
      extended by BingoValueCell

public class BingoValueCell
extends edu.kzoo.grid.GridObject

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.

Version:
6 June 2008
Author:
Alyce Brady

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

BingoValueCell

public BingoValueCell(int value,
                      java.awt.Color textColor)
Constructor for objects of class BingoValueCell.


BingoValueCell

public BingoValueCell(java.lang.String value,
                      java.awt.Color textColor)
Constructor for objects of class BingoValueCell.

Method Detail

changeColor

public void changeColor(java.awt.Color newColor)
Changes the color of the value in this cell to newColor.


color

public java.awt.Color color()
Gets color of value in this cell.


text

public java.lang.String text()
Gets the value in this cell as a String.


textEqualsValue

public 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.