|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectOOPI.tetris.util.Cell
Cell - an immutable class that represents one cell on a tetris game. Each cell can be filled (or not) and has a color.
TetrisFrame
,
TetrisLogic
,
Position
Constructor Summary | |
Cell()
Constructor for a new unfilled cell; |
|
Cell(java.awt.Color color)
Constructor for a new filled cell. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Utility to determine if too cells are equal |
java.awt.Color |
getColor()
Determines the color of this cell. |
int |
hashCode()
Utility to generate a hashcode for a cell |
boolean |
isFilled()
Determines if this cell is filled or not. |
java.lang.String |
toString()
Creates a string representation of this cell for debugging. |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Cell()
public Cell(java.awt.Color color)
color
- Specifies the color of this cellMethod Detail |
public boolean isFilled()
public java.awt.Color getColor()
public boolean equals(java.lang.Object obj)
public int hashCode()
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |