Class PitObstacle
java.lang.Object
za.co.wethinkcode.robots.server.world.Obstacle
za.co.wethinkcode.robots.server.world.PitObstacle
- All Implemented Interfaces:
Iterable<Position>,DangerousObject,WorldObject
The Pit Obstacle represents a bottomless pit that a robot can fall into
-
Nested Class Summary
Nested classes/interfaces inherited from class za.co.wethinkcode.robots.server.world.Obstacle
Obstacle.Brick -
Constructor Summary
ConstructorsConstructorDescriptionPitObstacle(Position topLeft, Position bottomRight) Standard Constructor for a bottomless pit -
Method Summary
Methods inherited from class za.co.wethinkcode.robots.server.world.Obstacle
addObstacle, blocksSightline, clear, getAll, getBottomRight, getTopLeft, hasObstacle, isEmpty, iterator, loadObstaclesFromPattern, size, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
PitObstacle
Standard Constructor for a bottomless pit- Parameters:
topLeft- the top left corner of the pitbottomRight- the bottom left corner of the pit
-
-
Method Details
-
harmRobot
Description copied from interface:DangerousObjectThis method takes in a target, manipulates their state, then returns it- Specified by:
harmRobotin interfaceDangerousObject- Parameters:
target- theRobotbeing harmed
-
getSymbol
- Specified by:
getSymbolin interfaceWorldObject- Overrides:
getSymbolin classObstacle
-