public void validateResult(Losr losr) { aboveOrWithinRule.validate(losr); Instruction instruction = planner.instruction(losr); if (matchExpectedInstruction) { if (!instruction.equals(command.scene().instruction())) { throw new RoboticException("Failed to match expected instruction."); } } }
public ParserContext(Command command) { this.planner = new Planner(command.scene().before()); this.tokens = command.tokens(); this.command = command; }