Class ClientTextRenderer


public class ClientTextRenderer extends TextRenderer
This class encapsulates all rendering behavior on the client

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

    • RENDER_OUTPUT

      public static OutputStream RENDER_OUTPUT
      Standard output unless reassigned
    • dbg

      public static DebugLevel dbg
      Standard debug level unless reassigned
    • RESET

      public static String RESET
  • Constructor Details

    • ClientTextRenderer

      public ClientTextRenderer()
  • Method Details

    • prettyJsonFormat

      public static String prettyJsonFormat(String message)
      Take in a raw unparsed string and prettify it
      Parameters:
      message - the raw string being prettified
    • helpfulMessage

      public static void helpfulMessage(String message)
    • renderClosing

      public static void renderClosing()
      Simple Styled closing
    • promptInput

      public static void promptInput(String message)
      Rendering designed for prompting an input from the user
      Parameters:
      message - the input being asked for
    • userCausedError

      public static void userCausedError(String message)
      Rendering designed for notifying the user that they have made an error
      Parameters:
      message - the error message for them to read
    • clientCausedError

      public static void clientCausedError(String message)
      Rendering designed for notifying the user that they have made an error
      Parameters:
      message - the error message for them to read
    • serverCausedError

      public static void serverCausedError(String message)
      Rendering designed for notifying the user that an error occurred on the server
      Parameters:
      message - the error message for them to read
    • stylishInfo

      public static void stylishInfo(String message)
      Rendering for info that is otherwise styled
      Parameters:
      message - the info being rendered
    • stylishInfo

      public static void stylishInfo(String message, String symbol)
      Overload of styled text with a custom symbol
    • stylishInfo

      public static void stylishInfo(String message, String symbol, Object configurable, Ansi_Styling configurableStyle)
      The complete implementation that overloads call. Allows a custom symbol, as well as a configurable ansi style
      Parameters:
      message - the info being rendered
    • worldPrint

      public static void worldPrint(String worldString)
    • styleMemory

      public static String styleMemory(Memory memory)
      Stylistically similar to a memory.toString()
      Parameters:
      memory - the memory instance being styled
      Returns:
      string version of a styled memory
    • formatLastResponse

      public static String formatLastResponse(RequestResponse reqResp)
      Format the last response the client received to be pretty printed
      Parameters:
      reqResp - the last completed request response flow
      Returns:
      a formatted and renderable string representation
    • formatLook

      public static String formatLook(com.google.gson.JsonObject lookResult)
    • renderBotSelection

      public static void renderBotSelection(Memory mem)
    • formatBotSelection

      public static String formatBotSelection(Memory mem)
    • setDbg

      public static void setDbg(DebugLevel dbg)