- All Implemented Interfaces:
- Agent, Piece
public class Slider
- extends AbstractAgent
A puzzle piece that can slide up-down or left-right when pushed.
It can be pushed behind a boulder, but will not push a boulder.
It will fall into a pit.
Called when this agent is hit by another agent (another agent collides
|Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final Serializer<Slider> SERIALIZER
- Type serializer.
public Slider(Direction dir)
dir - either "north" or "east"
public void onHitBy(Event event,
- Description copied from interface:
- Called when this agent is hit by another agent (another agent collides
with it). Typically the move event will be cancelled in this method,
unless this agent moves itself out of the way, such as boulders attempt to do.
- Specified by:
onHitBy in interface
onHitBy in class
© 2009 Alx Dark