Package itumulator.simulator
Interface Actor
public interface Actor
-
Method Summary
-
Method Details
-
act
The method called whenever the actor needs to simulate actions. The worlds 'current location' is only set at the time when the method is called. Thus, if you use setTile, remove, or delete, the current position does not automatically update. This has multiple implications, e.g., if you want to useWorld.getSurroundingTiles()
after usingWorld.setTile(itumulator.world.Location, java.lang.Object)
within the act method, the program will throw an exception. This can be circumvented by updating the current location (World.setCurrentLocation(itumulator.world.Location)
) or exclusively using the World methods which accepts a location parameter (by the same name).- Parameters:
world
- providing details of the position on which the actor is currently located and much more.
-