Class Environment2D


public class Environment2D extends SimuEnvironment
A 2D environment for simulations.
  • Constructor Details

    • Environment2D

      public Environment2D(int width, int height)
      Constructs an Environment2D with the specified width and height.
      Parameters:
      width - the width of the environment
      height - 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