Interface View

All Known Implementing Classes:
SwingViewImpl

public interface View
View Interface, gets/sets the current Scene and updates it.
  • Method Details

    • setScene

      void setScene(String scene)
      Sets the current scene.
      Parameters:
      scene - The scene name to load.
    • getSceneConstraint

      String getSceneConstraint()
      Gets the current scene.
      Returns:
      The currently loaded scene constraint.
    • update

      void update()
      Updates the current scene.
    • getController

      Controller getController()
      Returns the controller associated with the view.
      Returns:
      the controller associated with the view.
    • endGame

      void endGame(Optional<Boolean> win)
      The End Game handler.
      Parameters:
      win - if the player won or lose.
    • getScale

      Pair<Double,Double> getScale()
      Returns the scaled X and Y relative to their original dimensions. If the window dimension was not modified, their value should be both 1.
      Returns:
      a pair of the scaled dimensions