public void CreateGame(String fileName)
        {
            parser = new TajParser();
            GameEnded = false;
            flashLight = false;

            GameLost = false;
            if(fileName.IndexOf("Levels" + Path.DirectorySeparatorChar) != 0)
            {
                fileName = "Levels" + Path.DirectorySeparatorChar + fileName;
            }
            //code to load in world
            world = new WorldRenderer(SaveFileSystem.LoadObjectFromFile<World>(fileName, new GameLoader()));
            this.parser.SetCustomHandler(this);
            game = new ClassicTetrisGame();

            game.SetEventLink(this);
            parser.Parse(Start);
        }
 public void SetParser(TajParser p)
 {
     this.parser = p;
     this.parser.SetCustomHandler(this);
 }
        private void BuildParser()
        {
            TajParser p = new TajParser();

            p.SetStack((Stacker)variablesToBuild.Peek()["Stack"]);
            String[] s = convertArray<String>((Object[])(variablesToBuild.Peek()["Keys"]));
            StackObject[] b = convertArray<StackObject>((Object[])(variablesToBuild.Peek()["Values"]));
            p.SetVariables(s, b);

            buildStack.Push(p);

            currentClass.Pop();
            variablesToBuild.Pop();
        }