this.cakelight = cakelight;
this.config = config;
reader = new BufferedReader(new InputStreamReader(System.in));
+ register(new HelpCommand());
register(TwoColorNoiseMode.getCommand());
+ }
public CakeLight getCakelight() {
return cakelight;
return config;
}
+ private class HelpCommand implements Command {
+ @Override
+ public String[] getNames() {
+ return new String[] {"?", "h", "help"};
+ }
+
+ @Override
+ public void activate(Console console, String[] args) {
+ for (Command c : commandList) {
+ System.out.println(String.join("|", c.getNames()));
+ }
+ }
+ }
+
private void register(Command cmd) {
for (String name : cmd.getNames()){
if (commands.containsKey(name)) {