Class ServerRenderer
java.lang.Object
za.co.wethinkcode.robots.rendering.Renderer
za.co.wethinkcode.robots.rendering.TextRenderer
za.co.wethinkcode.robots.rendering.ServerRenderer
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 Summary
FieldsModifier and TypeFieldDescriptionstatic Stringstatic DebugLevelStandard debug level unless reassignedstatic Stringstatic Stringstatic OutputStreamStandard output unless reassignedFields inherited from class za.co.wethinkcode.robots.rendering.TextRenderer
RENDER_OUTPUTFields inherited from class za.co.wethinkcode.robots.rendering.Renderer
GUI_WINDOW -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidconnectToServerTicket(WorldConfig config, String ipAddress) Renders the connect to server ticket display based on an IP address invalid input: '&' configstatic voidPrompt message for a Server Command to be enteredstatic StringformatConnectToServerTicker(WorldConfig config, String ipAddress) static StringformatWorldToWorldMap(World world) Formatter for the whole worldstatic StringformatWorldWithinConstraints(Position viewPoint, World world) static voidprintWorld(World world) static voidrenderCommand(String commandOutput) Render the output of an executed command e.g.Methods inherited from class za.co.wethinkcode.robots.rendering.TextRenderer
customPrintln, customPrintln, logWorldCreation, newRobotConnectionReceivedCopy, renderANetworkMessage, renderAnInternalDebugMessage, renderAnInternalDebugMessage, renderAnInternalErrorMessage, renderAnInternalErrorMessage, renderMessage, renderMessageMethods inherited from class za.co.wethinkcode.robots.rendering.Renderer
updateRenderer
-
Field Details
-
out
Standard output unless reassigned -
dbg
Standard debug level unless reassigned -
FILLER_SYMBOL
-
INVISIBLE_SYMBOL
-
BLOCKED
-
-
Constructor Details
-
ServerRenderer
public ServerRenderer()
-
-
Method Details
-
renderCommand
Render the output of an executed command e.g.DumpCommand- Parameters:
commandOutput- the string representation of the executed command
-
formatWorldWithinConstraints
-
formatWorldToWorldMap
Formatter for the whole world -
connectToServerTicket
Renders the connect to server ticket display based on an IP address invalid input: '&' config- Parameters:
config- the world config being referencedipAddress- the ip address the server is hosted on
-
formatConnectToServerTicker
-
enterServerCommand
public static void enterServerCommand()Prompt message for a Server Command to be entered -
printWorld
-