Example #1
0
 public Parser(CommandWords newCommands)
 {
     //commands moved to a stack
     commands = new Stack <CommandWords>();
     _state   = new ParserNormalState();
     //commands = newCommands;
     Push(newCommands);
     //pushing the new commands
     NotificationCenter.Instance.addObserver("PlayerWillEnterState", PlayerWillEnterState);
 }
 public HelpCommand(CommandWords commands) : base()
 {
     words     = commands;
     this.name = "help";
 }
Example #3
0
 //accessibility to the stack, pushes commands into stacks
 public void Push(CommandWords newCommands)
 {
     commands.Push(newCommands);
 }