public List <string> Process(List <string> inputTexts)
        {
            var queryTexts = inputTexts.Where(x => x.Trim().EndsWith("?")).ToList();
            var intergalacticWordsTexts = inputTexts.Except(queryTexts).ToList();
            var inputStore = new InputStore(numberFormatCalculator, symbolValues);

            inputStore.Store(intergalacticWordsTexts);
            var queryInterpreter = new QueryInterpreter(numberFormatCalculator, symbolValues);

            return(queryInterpreter.Interpret(queryTexts));
        }
Ejemplo n.º 2
0
        public override void Initialize(Scene scene)
        {
            this.inputStore = this.world.GetGlobalResource <InputStore>();
            var scenario = scene.Map.Scenario;


            this.executor = new InterpretingScriptExecutor(scenario);
            this.engine   = new ScriptEngine(scene,
                                             this.executor,
                                             this.audioSystem,
                                             this.cameraSystem,
                                             this.actorSystem,
                                             this.animationSystem);

            this.executor.Initialize(this.engine);
            this.stopwatch = new Stopwatch();
            this.stopwatch.Start();
            scene.RegisterMetricSource(this.executor);

            base.Initialize(scene);
        }
Ejemplo n.º 3
0
 public override void Initialize(Scene scene)
 {
     this.renderList = this.world.GetGlobalResource <RenderListStore>();
     this.inputStore = this.world.GetGlobalResource <InputStore>();
 }