Class Environment2D
java.lang.Object
madkit.kernel.Agent
madkit.simulation.SimuAgent
madkit.kernel.Watcher
madkit.simulation.SimuEnvironment
madkit.simulation.environment.Environment2D
-
Nested Class Summary
Nested classes/interfaces inherited from class madkit.kernel.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 madkit.simulation.SimuEnvironment
onActivation
Methods inherited from class madkit.kernel.Watcher
addProbe, getProbes, onEnd, removeAllProbes, removeProbe, toString
Methods inherited from class madkit.simulation.SimuAgent
createSimuGroup, getCommunity, getEngineGroup, getEnvironment, getLauncher, getModel, getModelGroup, getNextEventDate, getScheduler, getSimuTimer, getViewers, launchAgent, leaveRole, leaveSimuGroup, leaveSimuRole, onSimulationStart, playRole, prng, requestSimuRole
Methods inherited from class madkit.kernel.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, 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
-