public class Cell
extends java.lang.Object
Constructor and Description |
---|
Cell()
Creates a cell at (0,0)
|
Cell(int row,
int col)
Creates a cell with the specified row and column
|
Modifier and Type | Method and Description |
---|---|
int |
getCol()
Returns the cell's column
|
int |
getRow()
Retrieves the cell's row
|
void |
moveDown()
Moves the cell down by decrementing the row
|
void |
moveLeft()
Moves the cell left by decrementing the column
|
void |
moveRight()
Moves the cell right by incrementing the column
|
void |
moveUp()
Moves the cell up by incrementing the row
|
void |
set(int row,
int col)
Sets the row and the column of the cell to the specified values.
|
void |
setCol(int col)
Sets the cell's column
|
void |
setRow(int row)
Sets the cell's row
|
public Cell()
public Cell(int row, int col)
public void moveLeft()
public void moveRight()
public void moveUp()
public void moveDown()
public void set(int row, int col)
public int getRow()
public void setRow(int row)
public int getCol()
public void setCol(int col)