Code: package AXJava; |
main example
Code:
ContextCmd a = new ContextCmd();
a.commands.add("what did i need to do");
a.contextCommands.add("what else");
a.contextCommands.add("and");
a.contextCommands.add("next");
System.out.println(a.engageCommand("hello"));
System.out.println(a.engageCommand("what else"));
System.out.println(a.engageCommand("what did i need to do"));
System.out.println(a.engageCommand("what else"));
System.out.println(a.engageCommand("what did i need to do"));
for (int i = 0; i < 4; i++) {
System.out.println(a.engageCommand("what else"));
// System.out.println(n.wait(""));
}