public class Cell
extends java.lang.Object
implements java.lang.Cloneable
Constructor and Description |
---|
Cell()
Create a new cell containing air.
|
Cell(int id)
Create a new block in this cell.
|
Cell(int id,
int value)
Create a new block in this cell.
|
Cell(int id,
int value,
Coordinate coords)
Create a new block in this cell.
|
Modifier and Type | Method and Description |
---|---|
protected Cell |
clone() |
Block |
getBlock() |
int[] |
getCellOffset()
The cell offset has it's center in the top left corner.
|
void |
setBlock(Block block)
Set the block inside this cell.
|
void |
setCellOffset(int[] cellOffset)
The cell offset has it's center in the top left corner.
|
void |
setCellOffset(int field,
int offset) |
public Cell()
public Cell(int id)
id
- public Cell(int id, int value)
id
- value
- public Cell(int id, int value, Coordinate coords)
id
- value
- coords
- public Block getBlock()
public void setBlock(Block block)
block
- public int[] getCellOffset()
public void setCellOffset(int[] cellOffset)
cellOffset
- public void setCellOffset(int field, int offset)
field
- offset
- protected Cell clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException