Modifier and Type | Field and Description |
---|---|
protected Configuration |
conf |
protected Integer |
downFramesRemaining |
protected Field |
field |
protected int |
ghost |
protected boolean |
holdable |
protected boolean |
holdEnabled |
protected EngineListener[] |
listeners |
protected boolean |
over |
protected boolean |
paused |
protected Integer |
respawnFramesRemaining |
protected int |
shape |
protected long |
shapeCount |
protected long |
shapeId |
protected ShapeSource |
shapes |
protected long |
tickCount |
Constructor and Description |
---|
Engine() |
Engine(Field field,
Configuration conf) |
Modifier and Type | Method and Description |
---|---|
void |
addEngineListener(EngineListener l) |
Block |
block(int x,
int y) |
Engine |
clone() |
protected ShapeType |
enqueue(ShapeType type) |
void |
garbage(int lines) |
Field |
getField() |
int |
getGhost() |
ShapeType |
getHold() |
long |
getLines() |
ShapeType[] |
getNext() |
long |
getScore() |
int |
getShape() |
long |
getShapeCount() |
long |
getShapeId() |
ShapeSource |
getShapes() |
long |
getTickCount() |
boolean |
isHoldable() |
boolean |
isHoldEnabled() |
boolean |
isOver() |
boolean |
isPaused() |
void |
removeEngineListener(EngineListener l) |
void |
reset() |
void |
setHold(ShapeType hold) |
void |
setHoldable(boolean holdable) |
void |
setHoldEnabled(boolean holdEnabled) |
void |
setNext(ShapeType[] next) |
void |
setPaused(boolean paused) |
void |
setShape(int shape) |
void |
setShapes(ShapeSource shapes) |
boolean |
tick(Command c) |
protected Configuration conf
protected Field field
protected ShapeSource shapes
protected boolean over
protected long tickCount
protected long shapeCount
protected int shape
protected int ghost
protected long shapeId
protected Integer downFramesRemaining
protected Integer respawnFramesRemaining
protected boolean paused
protected boolean holdEnabled
protected boolean holdable
protected EngineListener[] listeners
public Engine()
public Engine(Field field, Configuration conf)
public void reset()
public Block block(int x, int y)
public void garbage(int lines)
public boolean tick(Command c)
public void addEngineListener(EngineListener l)
public void removeEngineListener(EngineListener l)
public Field getField()
public long getLines()
public boolean isOver()
public int getShape()
public int getGhost()
public void setShape(int shape)
public ShapeType[] getNext()
public long getTickCount()
public ShapeSource getShapes()
public long getScore()
public boolean isPaused()
public void setPaused(boolean paused)
public long getShapeCount()
public void setNext(ShapeType[] next)
public long getShapeId()
public void setShapes(ShapeSource shapes)
public ShapeType getHold()
public void setHold(ShapeType hold)
public boolean isHoldable()
public void setHoldable(boolean holdable)
public boolean isHoldEnabled()
public void setHoldEnabled(boolean holdEnabled)
Copyright © 2015. All rights reserved.