Interface IView

All Known Implementing Classes:
GUI, TUI

public interface IView
View interface implemented by both the TUI and GUI.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Re-renders the view based on the current mini model state.
    void
    setModel(MiniModel miniModel)
    Updates the view's local copy of the game model.
    void
    showError(ErrorType error, String message)
    Displays an error message to the user.
  • Method Details

    • setModel

      void setModel(MiniModel miniModel)
      Updates the view's local copy of the game model.
      Parameters:
      miniModel - the latest mini model received from the server.
    • render

      void render()
      Re-renders the view based on the current mini model state.
    • showError

      void showError(ErrorType error, String message)
      Displays an error message to the user.
      Parameters:
      error - the error type.
      message - a human-readable description of the error.