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.Level
static final org.apache.logging.log4j.Level
static final org.apache.logging.log4j.Level
private final org.apache.logging.log4j.Logger
static 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 TypeMethodDescriptionvoid
displayDebug
(String message) void
displayEnd
(String message) void
displayError
(String message) Display a message to logger.errorvoid
displayFullStats
(String message) void
void
displayMessage
(String message) Display a message to logger.infovoid
displayScoreBoard
(String message) void
displayStats
(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:
displayMessage
in interfaceUserInterface
- Parameters:
message
- the message to display to logger.info
-
displayError
Display a message to logger.error- Specified by:
displayError
in interfaceUserInterface
- Parameters:
message
- the error message to display to logger.error
-
displayDebug
- Specified by:
displayDebug
in interfaceUserInterface
-
displayStats
-
displayScoreBoard
-
displayFullStats
-
displayEnd
-
displayLineSeparator
public void displayLineSeparator()
-