Class OutputAbstraction

java.lang.Object
it.polimi.ingsw.Client.View.OutputAbstraction

public class OutputAbstraction extends Object
Terminal/GUI abstractions, to show informative or error messages
  • Field Details

    • useGUI

      private final boolean useGUI
    • pw

      private final PrintWriter pw
  • Constructor Details

    • OutputAbstraction

      public OutputAbstraction(boolean useGUI, PrintWriter pw)
      Abstracts output between terminal and GUI
      Parameters:
      useGUI - true if GUI is being used
      pw - PrintWriter to write on
  • Method Details

    • showInfo

      public void showInfo(String i)
      Outputs an Informative message
      Parameters:
      i - informative message
    • showError

      public void showError(String e)
      Outputs an Error message
      Parameters:
      e - error message
    • showErrorConfirm

      public void showErrorConfirm(String e)
      Outputs an Error and waits (on GUI) for User confirmation
      Parameters:
      e - error message