Class Commands
java.lang.Object
nz.ac.vuw.ecs.swen225.gp6.renderer.Commands
This class is used to store the commands that the user can input into the log panel.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCommands(String command, String description, Runnable action) Adds a command to the commands HashMap.voidinvokes the command.voidsetRenderer(MazeRenderer mazeRenderer) Displays the available commands.
-
Constructor Details
-
Commands
Constructor for Commands.- Parameters:
logPanel- the logPanel to be used
-
-
Method Details
-
addCommands
Adds a command to the commands HashMap.- Parameters:
command- the command to be addeddescription- the description of the commandaction- the action to be performed
-
invoke
invokes the command.- Parameters:
s- the command to be invoked
-
setRenderer
Displays the available commands.- Parameters:
mazeRenderer- the renderer for the maze
-