Package view

Class GameField

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
MapEditorView

public class GameField extends GameFieldRenderer
Implementation of the GameField class, which displays the game table.
See Also:
  • Field Details

    • type

      protected Types type
      The selection type.
    • inverted

      protected boolean inverted
      Determines if the selection is inverted.
    • gameFieldModel

      protected final GameFieldModel gameFieldModel
      Model of the GameField.
    • refreshTimer

      protected final Timer refreshTimer
      Timer to refresh the game field.
  • Constructor Details

    • GameField

      public GameField(Game game, JFrame frame)
      Constructs a new GameField instance.
      Parameters:
      game - Game dependency injection
      frame - the parent frame
  • Method Details

    • getWayPoints

      public ArrayList<Point> getWayPoints()
      Returns the waypoints.
      Returns:
      the waypoints
    • updateUIState

      public void updateUIState()
      Updates the UIState.
    • setupButtons

      protected void setupButtons()
      Sets the panel's buttons
    • refreshGameField

      public void refreshGameField()
      Redraws the canvas.
    • placeBlock

      protected void placeBlock(int x, int y)
      Places the Entity.
      Parameters:
      x - the horizontal coordinate
      y - the vertical coordinate