Class Environment2D
java.lang.Object
madkit.kernel.Agent
madkit.simulation.SimuAgent
madkit.kernel.Watcher
madkit.simulation.SimuEnvironment
madkit.simulation.environment.Environment2D
A 2D environment for simulations.
-
Nested Class Summary
Nested classes/interfaces inherited from class Agent
Agent.ReturnCode -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an Environment2D with default dimensions (600x600).Environment2D(int width, int height) Constructs an Environment2D with the specified width and height. -
Method Summary
Methods inherited from class SimuEnvironment
onActivationMethods inherited from class Watcher
addProbe, getProbes, onEnd, removeAllProbes, removeProbe, toStringMethods inherited from class SimuAgent
createSimuGroup, getCommunity, getEngineGroup, getEnvironment, getLauncher, getModel, getModelGroup, getNextEventDate, getScheduler, getSimuTimer, getViewers, launchAgent, leaveRole, leaveSimuGroup, leaveSimuRole, onSetupSimulation, playRole, prng, requestSimuRoleMethods inherited from class Agent
activate, broadcast, broadcastWithRole, broadcastWithRoleWaitForReplies, checkAgentAddress, createGroup, createGroup, createGroup, end, equals, executeThisAgent, executeThisAgent, exitOnKill, getAgentsWithRole, getAgentWithRole, getKernelAddress, getKernelConfig, getLogger, getMailbox, getName, getNetworkID, getOrganization, getReplyTo, handleRequestActionMessage, hashCode, isAlive, killAgent, killAgent, launchAgent, launchAgent, leaveGroup, leaveRole, live, nextMessage, onLive, pause, proceedEnumMessage, receiveMessage, reload, reply, replyWithRole, requestRole, requestRole, send, send, sendWaitReply, sendWaitReply, sendWithRole, sendWithRole, sendWithRoleWaitReply, sendWithRoleWaitReply, setupDefaultGUI, waitAnswer, waitAnswer, waitNextMessage, waitNextMessage
-
Constructor Details
-
Environment2D
public Environment2D(int width, int height) Constructs an Environment2D with the specified width and height.- Parameters:
width- the width of the environmentheight- the height of the environment
-
Environment2D
public Environment2D()Constructs an Environment2D with default dimensions (600x600).
-
-
Method Details
-
setWidth
public void setWidth(int width) Sets the width of the environment.- Parameters:
width- the width to set
-
getWidth
public int getWidth()Returns the width of the environment.- Returns:
- the width of the environment
-
setHeight
public void setHeight(int height) Sets the height of the environment.- Parameters:
height- the height to set
-
getHeight
public int getHeight()Returns the height of the environment.- Returns:
- the height of the environment
-