Example #1
0
        private void Init()
        {
            CompsScatteredSoFar  = 0;
            OverlappedComponents = 0;
            UpdateActionsIds     = new List <UpdateActionPair>();
            //CookieFrogMinDist = Int32.MaxValue;
            ActionsSoFar     = 0;
            _rand            = new Random(DateTime.Now.Millisecond);
            _placedCompSoFar = new List <Vector2>();
            //this.CATPairs[3].KeyTime = 412;
            //CATPairs[2].KeyTime = 367;
            IsPathIntersection = false;
            _ropeId            = 0;
            _bubbleId          = 0;
            IsSuccess          = false;
            Simulator          = new PlayabilitySimulatorEngineProlog(false);
            Actions            = new List <Action>();

            _rand = new Random(DateTime.Now.Millisecond);
            InitializeRanges();
            _nextCTP = CATPairs[0];

            String[] args = new String[2];

            String ropesStr = String.Empty;

            if (_isRopesRandomized)
            {
                ropesStr = GenerateRopesString();
            }
            else
            {
                ropesStr = GenerateRopesStringFromCatPairs();
            }

            LevelStr = "cookie(200, 300)" + ropesStr;
            args[1]  = LevelStr;

            LevelBuilder.CreateRestedLevel(LevelStr, false);
            AddCandyPlacement();
            if (IsTesting)
            {
                Shotter.TakeEngineShot(false);
            }
        }
Example #2
0
        private void UpdateEngine(int time)
        {
            PlayabilitySimulatorEngineProlog simulator = new PlayabilitySimulatorEngineProlog(false);

            simulator.RunEngineFreely(time, new GameTime());
        }