BoardCell - Represents a single cell within a Board.
More...
|
|
int | row |
| | the row of this cell within the Board ( >= 0 )
|
| |
|
int | column |
| | the column of this cell within the Board ( >= 0 )
|
| |
|
CellType | myCellType |
| | the current contents of this cell
|
| |
|
boolean | addedToSearchList = false |
| | Has this cell been added to the search queue yet?
|
| |
|
BoardCell | parent = null |
| | Where did we came from, when search first reached this BoardCell?
|
| |
BoardCell - Represents a single cell within a Board.
- Author
- CS60 instructors
| com.gradescope.spampede.BoardCell.BoardCell |
( |
int |
inputRow, |
|
|
int |
inputColumn, |
|
|
CellType |
type |
|
) |
| |
Constructor.
- Parameters
-
| inputRow | the row of this cell |
| inputColumn | the column of this cell |
| type | the initial contents of this cell |
| com.gradescope.spampede.BoardCell.BoardCell |
( |
int |
inputRow, |
|
|
int |
inputColumn, |
|
|
CellType |
type |
|
) |
| |
Constructor.
- Parameters
-
| inputRow | the row of this cell |
| inputColumn | the column of this cell |
| type | the initial contents of this cell |
| void com.gradescope.spampede.BoardCell.becomeSpam |
( |
| ) |
|
| void com.gradescope.spampede.BoardCell.becomeSpam |
( |
| ) |
|
| Color com.gradescope.spampede.BoardCell.getCellColor |
( |
| ) |
|
- Returns
- The color for drawing this cell
| Color com.gradescope.spampede.BoardCell.getCellColor |
( |
| ) |
|
- Returns
- The color for drawing this cell
| int com.gradescope.spampede.BoardCell.getColumn |
( |
| ) |
|
| int com.gradescope.spampede.BoardCell.getColumn |
( |
| ) |
|
| BoardCell com.gradescope.spampede.BoardCell.getParent |
( |
| ) |
|
- Returns
- the parent of this cell
| BoardCell com.gradescope.spampede.BoardCell.getParent |
( |
| ) |
|
- Returns
- the parent of this cell
| int com.gradescope.spampede.BoardCell.getRow |
( |
| ) |
|
| int com.gradescope.spampede.BoardCell.getRow |
( |
| ) |
|
| boolean com.gradescope.spampede.BoardCell.inSearchListAlready |
( |
| ) |
|
- Returns
- Has this cell been added to our BFS search queue yet?
| boolean com.gradescope.spampede.BoardCell.inSearchListAlready |
( |
| ) |
|
- Returns
- Has this cell been added to our BFS search queue yet?
| boolean com.gradescope.spampede.BoardCell.isBody |
( |
| ) |
|
- Returns
- Does this cell contain part of the snake (not the head)?
| boolean com.gradescope.spampede.BoardCell.isBody |
( |
| ) |
|
- Returns
- Does this cell contain part of the snake (not the head)?
| boolean com.gradescope.spampede.BoardCell.isHead |
( |
| ) |
|
- Returns
- Does this cell contain the head of the snake?
| boolean com.gradescope.spampede.BoardCell.isHead |
( |
| ) |
|
- Returns
- Does this cell contain the head of the snake?
| boolean com.gradescope.spampede.BoardCell.isOpen |
( |
| ) |
|
- Returns
- Is this cell open (not a wall or a snake body part)?
| boolean com.gradescope.spampede.BoardCell.isOpen |
( |
| ) |
|
- Returns
- Is this cell open (not a wall or a snake body part)?
| boolean com.gradescope.spampede.BoardCell.isSpam |
( |
| ) |
|
- Returns
- Does this cell contain spam?
| boolean com.gradescope.spampede.BoardCell.isSpam |
( |
| ) |
|
- Returns
- Does this cell contain spam?
| boolean com.gradescope.spampede.BoardCell.isWall |
( |
| ) |
|
- Returns
- Is this cell a wall?
| boolean com.gradescope.spampede.BoardCell.isWall |
( |
| ) |
|
- Returns
- Is this cell a wall?
| String com.gradescope.spampede.BoardCell.toString |
( |
| ) |
|
- Returns
- the cell as a string.
| String com.gradescope.spampede.BoardCell.toString |
( |
| ) |
|
- Returns
- the cell as a string.
| String com.gradescope.spampede.BoardCell.toStringParent |
( |
| ) |
|
- Returns
- the parent of a cell, as a string
| String com.gradescope.spampede.BoardCell.toStringParent |
( |
| ) |
|
- Returns
- the parent of a cell, as a string
| String com.gradescope.spampede.BoardCell.toStringType |
( |
| ) |
|
- Returns
- the contents of the cell, as a single character.
| String com.gradescope.spampede.BoardCell.toStringType |
( |
| ) |
|
- Returns
- the contents of the cell, as a single character.
The documentation for this class was generated from the following file: