Class ServerRenderer


public class ServerRenderer extends TextRenderer
This class encapsulates all rendering behavior on the server side

Most methods contained in this class are void methods that print statements to render the TUI

All of these are designed to be pure render methods, causing no state mutations.

  • Field Details

    • out

      public static OutputStream out
      Standard output unless reassigned
    • dbg

      public static DebugLevel dbg
      Standard debug level unless reassigned
    • FILLER_SYMBOL

      public static String FILLER_SYMBOL
    • INVISIBLE_SYMBOL

      public static String INVISIBLE_SYMBOL
    • BLOCKED

      public static String BLOCKED
  • Constructor Details

    • ServerRenderer

      public ServerRenderer()
  • Method Details

    • renderCommand

      public static void renderCommand(String commandOutput)
      Render the output of an executed command e.g. DumpCommand
      Parameters:
      commandOutput - the string representation of the executed command
    • formatWorldWithinConstraints

      public static String formatWorldWithinConstraints(Position viewPoint, World world)
    • formatWorldToWorldMap

      public static String formatWorldToWorldMap(World world)
      Formatter for the whole world
    • connectToServerTicket

      public static void connectToServerTicket(WorldConfig config, String ipAddress)
      Renders the connect to server ticket display based on an IP address invalid input: '&' config
      Parameters:
      config - the world config being referenced
      ipAddress - the ip address the server is hosted on
    • formatConnectToServerTicker

      public static String formatConnectToServerTicker(WorldConfig config, String ipAddress)
    • enterServerCommand

      public static void enterServerCommand()
      Prompt message for a Server Command to be entered
    • printWorld

      public static void printWorld(World world)