Class Grid

java.lang.Object
ch.epfl.cs107.play.engine.actor.Entity
ch.epfl.cs107.play.engine.actor.Grid
All Implemented Interfaces:
Acoustics, Actor, Graphics, Updatable, Positionable

public class Grid extends Entity
Grid Overlay entity Draw a grid on the DiscreteCoordinate Lines: Assume a coordinate system which is graduated every unit (0, 1, 2, ...) Assume a grid overlay with unit square
  • Constructor Details

    • Grid

      public Grid(int width, int height)
      Default Grid Constructor
      Parameters:
      width - (int): of the desired grid
      height - (int): of the desired grid
    • Grid

      public Grid(Area area)
  • Method Details

    • draw

      public void draw(Canvas canvas)
      Description copied from interface: Graphics
      Renders itself on specified canvas.
      Parameters:
      canvas - target, not null