Class MutableWorld
java.lang.Object
za.co.wethinkcode.robots.server.worldinfo.MutableWorld
The Mutable singleton of the world. This cannot be directly updated.
NOTE: THIS METHOD IS BEING DEPRECIATED AND REPLACED BY
WorldStateIdentity-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClientToWorld(Client client) Add a new client connectionvoidaddObjectToWorld(WorldObject worldObject, Position position) Void method to add an instance into the WorldRetrieve a new WorldState from the mutableWorldMostly a utility method to get an identity in two lines.voidreplaceObjectAtPosition(WorldObject worldObject, Position position) Destructively add an object at a positionvoidupdateObjectPosition(WorldObject worldObject, Position position) Update the position of a world object that already exists in the world
-
Constructor Details
-
MutableWorld
public MutableWorld()
-
-
Method Details
-
addClientToWorld
Add a new client connection- Parameters:
client- a connected ClientObject
-
getWorldState
Retrieve a new WorldState from the mutableWorld- Returns:
-
getWorldStateIdentity
Mostly a utility method to get an identity in two lines. This needs to be depreciated as soon as possible- Returns:
- WorldStateIdentity