Package com.takenoko.ui
Class ConsoleUserInterface
java.lang.Object
com.takenoko.ui.ConsoleUserInterface
- All Implemented Interfaces:
UserInterface
Console user interface
This class is used to interact with the user through loggers.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.logging.log4j.Levelstatic final org.apache.logging.log4j.Levelstatic final org.apache.logging.log4j.Levelprivate final org.apache.logging.log4j.Loggerstatic final org.apache.logging.log4j.Level -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new ConsoleUserInterface with default loggerConsoleUserInterface(org.apache.logging.log4j.Logger logger) Create a new ConsoleUserInterface with the given logger -
Method Summary
Modifier and TypeMethodDescriptionvoiddisplayDebug(String message) voiddisplayEnd(String message) voiddisplayError(String message) Display a message to logger.errorvoiddisplayFullStats(String message) voidvoiddisplayMessage(String message) Display a message to logger.infovoiddisplayScoreBoard(String message) voiddisplayStats(String message)
-
Field Details
-
logger
private final org.apache.logging.log4j.Logger logger -
FULLSTATS
public static final org.apache.logging.log4j.Level FULLSTATS -
GAMESTATS
public static final org.apache.logging.log4j.Level GAMESTATS -
SCOREBOARD
public static final org.apache.logging.log4j.Level SCOREBOARD -
END
public static final org.apache.logging.log4j.Level END
-
-
Constructor Details
-
ConsoleUserInterface
public ConsoleUserInterface(org.apache.logging.log4j.Logger logger) Create a new ConsoleUserInterface with the given logger- Parameters:
logger- the logger to use
-
ConsoleUserInterface
public ConsoleUserInterface()Create a new ConsoleUserInterface with default logger
-
-
Method Details
-
displayMessage
Display a message to logger.info- Specified by:
displayMessagein interfaceUserInterface- Parameters:
message- the message to display to logger.info
-
displayError
Display a message to logger.error- Specified by:
displayErrorin interfaceUserInterface- Parameters:
message- the error message to display to logger.error
-
displayDebug
- Specified by:
displayDebugin interfaceUserInterface
-
displayStats
-
displayScoreBoard
-
displayFullStats
-
displayEnd
-
displayLineSeparator
public void displayLineSeparator()
-