public static int GetMaxLevelPoints(Enums.Level level)
        {
            MaxLevelPoint points;

            if (level == Enums.Level.Advanced)
            {
                points = MaxLevelPoint.Advanced;
            }
            else if (level == Enums.Level.UpperIntermediate)
            {
                points = MaxLevelPoint.UpperIntermediate;
            }
            else if (level == Enums.Level.Intermediate)
            {
                points = MaxLevelPoint.Intermediate;
            }
            else if (level == Enums.Level.PreIntermediate)
            {
                points = MaxLevelPoint.PreIntermediate;
            }
            else if (level == Enums.Level.Elementary)
            {
                points = MaxLevelPoint.Elementary;
            }
            else
            {
                points = MaxLevelPoint.Undefined;
            }
            return((int)points);
        }
Beispiel #2
0
        public int[,] GeneratePuzzle(Enums.Level level)
        {
            InitilazeHelper();
            int[,] sudoku = EmptySudoku();

            for (int i = 0; i < Length; i++)
            {
                for (int j = 0; j < Length; j++)
                {
                    List <int> numberList = new List <int>();
                    helper.GetNotAllowedNumberList(sudoku, i, j, ref numberList);
                    List <int> allowedNumberList = helper.GetAllowedNumberList(numberList);
                    if (allowedNumberList.Count != 0)
                    {
                        sudoku[i, j] = GetRandomNumber(allowedNumberList);
                    }
                    else
                    {
                        helper.PrintSudoku(sudoku);
                        break;
                    }
                }
            }

            return(sudoku);
        }
        public int GetUserLevel()
        {
            string userId = GetUser();

            var points = Context.UsersPoints.Where(v => v.User.Id == userId)
                         .Select(s => new { s.ListeningPoints, s.WritingPoints, s.SpeakingPoints }).FirstOrDefault();

            if (userId == null || points == null)
            {
                return((int)Enums.Level.Elementary);
            }

            int arithmeticMean = ((int)points.ListeningPoints + (int)points.WritingPoints) / 2;

            Enums.Level level = PointsLevel.GetLevel(arithmeticMean);

            return((int)level);
        }
 public NSIException(string message, Enums.Level severity, Enums.ErrorType errorType, object request) : base(message)
 {
     Severity     = severity;
     ErrorType    = errorType;
     _requestData = request;
 }
 public NSIException(string message, Enums.Level severity, Enums.ErrorType errorType) : base(message)
 {
     Severity  = severity;
     ErrorType = errorType;
 }
 public NSIException(Enums.Level severity, Enums.ErrorType errorType) : base()
 {
     Severity  = severity;
     ErrorType = errorType;
 }
Beispiel #7
0
        /// <summary>
        /// GenerateNumber
        /// </summary>
        /// <param name="level"></param>
        /// <param name="operation"></param>
        /// <returns></returns>
        public static Number Generate_2NumbersOperationResult(Enums.Level level, Enums.MathOperation operation)
        {
            int    randomNumber1    = 0;
            int    randomNumber2    = 0;
            string strRandomNumber1 = "";
            string strRandomNumber2 = "";

            // + - * /
            Enums.MathOperation randomOperation = GetRandomOperation(1, 4);
            operation = Settings.paramMathOperation;
            if (operation == Enums.MathOperation.Random)
            {
                operation = randomOperation;
            }

            if (level == Enums.Level.Level1)
            {
                //int randomNumber1 = GetRandomValueLength(level);
                //int randomNumber2 = GetRandomValueLength(level);
                randomNumber1 = GetRandomValue(0, 10);
                Thread.Sleep(10);
                randomNumber2 = GetRandomValue(0, 10);
            }
            else if (level == Enums.Level.Level2)
            {
                randomNumber1 = GetRandomValue(0, 100);
                Thread.Sleep(10);
                randomNumber2 = GetRandomValue(0, 100);
            }
            else if (level == Enums.Level.Level3)
            {
                randomNumber1 = GetRandomValue(0, 1000);
                Thread.Sleep(10);
                randomNumber2 = GetRandomValue(0, 1000);
            }
            else if (level == Enums.Level.Level4)
            {
                randomNumber1 = GetRandomValue(0, 10000);
                Thread.Sleep(10);
                randomNumber2 = GetRandomValue(0, 100);
            }
            else if (level == Enums.Level.Level5)
            {
                randomNumber1 = GetRandomValue(0, 1000000);
                Thread.Sleep(10);
                randomNumber2 = GetRandomValue(0, 1000000);
            }
            else if (level == Enums.Level.Level6)
            {
                randomNumber1 = GetRandomValue(0, 10000);
                Thread.Sleep(10);
                randomNumber2    = GetRandomValue(0, 100);
                strRandomNumber2 = string.Format("Math.{0}({1})", GetRandomMathFunctionWith1Parameter().ToString(), randomNumber2);
            }
            else if (level == Enums.Level.Level7)
            {
                randomNumber1 = GetRandomValue(0, 10000);
                Thread.Sleep(10);
                randomNumber2 = GetRandomValue(0, 100);
                int randomNumber3 = GetRandomValueLength(3);
                strRandomNumber2 = string.Format("Math.{0}({1} , {2})", GetRandomMathFunctionWith1Parameter().ToString(), randomNumber2, randomNumber3);
            }

            if (strRandomNumber1 == "")
            {
                strRandomNumber1 = randomNumber1.ToString();
            }
            if (strRandomNumber2 == "")
            {
                strRandomNumber2 = randomNumber2.ToString();
            }

            // Never DIVIDE BY 0
            if ((randomNumber2 == 0) && (operation == Enums.MathOperation.Division))
            {
                randomNumber2 = 1;
            }

            Number number = new Number();

            number = FillNumber(level, randomNumber1, operation, randomNumber2, strRandomNumber1, strRandomNumber2);
            return(number);
        }
Beispiel #8
0
        private static Number FillNumber(Enums.Level level, int randomNumber1, Enums.MathOperation operation, int randomNumber2, string strRandomNumber1, string strRandomNumber2)//, double result)
        {
            //double result = Calculate(randomNumber1, operation, randomNumber2);
            // CALCULATE
            string formula = string.Format("{0} {1} {2}", strRandomNumber1, ConvertEnums.ConvertMathOperation(operation), strRandomNumber2);
            double result  = CalculateMathFormula(formula); //.Replace(" ",""));
            //if (result.Equals(double.NaN))
            //    result = 0.00;

            Number number = new Number();

            if (result.Equals(double.NaN))
            {
                string strError = "ERROR";
                number.ID                                   = 0;
                number.Number_1                             = randomNumber1;
                number.Number_1_French                      = strError;
                number.Number_1_English                     = strError;
                number.Number_1_Italian                     = strError;
                number.Number_1_Spanish                     = strError;
                number.Number_1_Portuguese                  = strError;
                number.Number_1_German                      = strError;
                number.Number_operation                     = operation;
                number.Number_2                             = randomNumber2;
                number.Number_2_French                      = strError;
                number.Number_2_English                     = strError;
                number.Number_2_Italian                     = strError;
                number.Number_2_Spanish                     = strError;
                number.Number_2_Portuguese                  = strError;
                number.Number_2_German                      = strError;
                number.Number_result                        = result;
                number.Number_result_French                 = strError;
                number.Number_result_English                = strError;
                number.Number_result_Italian                = strError;
                number.Number_result_Spanish                = strError;
                number.Number_result_Portuguese             = strError;
                number.Number_result_German                 = strError;
                number.Number_equation_LessOrGreaterOrEqual = (strRandomNumber1 + " ? " + strRandomNumber2);

                number.Number_result_LessOrGreaterOrEqual = strError;

                number.Number_equation            = string.Format("{0} {1} {2} = ?", strRandomNumber1, ConvertEnums.ConvertMathOperation(operation), strRandomNumber2);
                number.Number_equation_French     = string.Format("{0} {1} {2} = ?", number.Number_1_French, ConvertEnums.ConvertMathOperation_French(operation), number.Number_2_French);
                number.Number_equation_English    = string.Format("{0} {1} {2} = ?", number.Number_1_English, ConvertEnums.ConvertMathOperation_English(operation), number.Number_2_English);
                number.Number_equation_Italian    = string.Format("{0} {1} {2} = ?", number.Number_1_Italian, ConvertEnums.ConvertMathOperation_Italian(operation), number.Number_2_Italian);
                number.Number_equation_Spanish    = string.Format("{0} {1} {2} = ?", number.Number_1_Spanish, ConvertEnums.ConvertMathOperation_Spanish(operation), number.Number_2_Spanish);
                number.Number_equation_Portuguese = string.Format("{0} {1} {2} = ?", number.Number_1_Portuguese, ConvertEnums.ConvertMathOperation_Portuguese(operation), number.Number_2_Portuguese);
                number.Number_equation_German     = string.Format("{0} {1} {2} = ?", number.Number_1_German, ConvertEnums.ConvertMathOperation_German(operation), number.Number_2_German);
            }
            else
            {
                number.ID                                   = 0;
                number.Number_1                             = randomNumber1;
                number.Number_1_French                      = NumberToWord.NumberToWords_French(randomNumber1);
                number.Number_1_English                     = NumberToWord.NumberToWords_English(randomNumber1);
                number.Number_1_Italian                     = NumberToWord.NumberToWords_Italian(randomNumber1);
                number.Number_1_Spanish                     = NumberToWord.NumberToWords_Spanish(randomNumber1);
                number.Number_1_Portuguese                  = NumberToWord.NumberToWords_Portuguese(randomNumber1);
                number.Number_1_German                      = NumberToWord.NumberToWords_German(randomNumber1);
                number.Number_operation                     = operation;
                number.Number_2                             = randomNumber2;
                number.Number_2_French                      = NumberToWord.NumberToWords_French(randomNumber2);
                number.Number_2_English                     = NumberToWord.NumberToWords_English(randomNumber2);
                number.Number_2_Italian                     = NumberToWord.NumberToWords_Italian(randomNumber2);
                number.Number_2_Spanish                     = NumberToWord.NumberToWords_Spanish(randomNumber2);
                number.Number_2_Portuguese                  = NumberToWord.NumberToWords_Portuguese(randomNumber2);
                number.Number_2_German                      = NumberToWord.NumberToWords_German(randomNumber2);
                number.Number_result                        = result;
                number.Number_result_French                 = NumberToWord.NumberToWords_French(result);
                number.Number_result_English                = NumberToWord.NumberToWords_English((int)result);
                number.Number_result_Italian                = NumberToWord.NumberToWords_Italian(result);
                number.Number_result_Spanish                = NumberToWord.NumberToWords_Spanish(result);
                number.Number_result_Portuguese             = NumberToWord.NumberToWords_Portuguese(result);
                number.Number_result_German                 = NumberToWord.NumberToWords_German(result);
                number.Number_equation_LessOrGreaterOrEqual = (strRandomNumber1 + " ? " + strRandomNumber2);

                string strResultGreaterOrLessThan = "";
                if (number.Number_1 > number.Number_2)
                {
                    strResultGreaterOrLessThan = ">";
                }
                else if (number.Number_1 < number.Number_2)
                {
                    strResultGreaterOrLessThan = "<";
                }
                else if (number.Number_1 == number.Number_2)
                {
                    strResultGreaterOrLessThan = "=";
                }
                number.Number_result_LessOrGreaterOrEqual = strResultGreaterOrLessThan;

                number.Number_equation            = string.Format("{0} {1} {2} = ?", strRandomNumber1, ConvertEnums.ConvertMathOperation(operation), strRandomNumber2);
                number.Number_equation_French     = string.Format("{0} {1} {2} = ?", number.Number_1_French, ConvertEnums.ConvertMathOperation_French(operation), number.Number_2_French);
                number.Number_equation_English    = string.Format("{0} {1} {2} = ?", number.Number_1_English, ConvertEnums.ConvertMathOperation_English(operation), number.Number_2_English);
                number.Number_equation_Italian    = string.Format("{0} {1} {2} = ?", number.Number_1_Italian, ConvertEnums.ConvertMathOperation_Italian(operation), number.Number_2_Italian);
                number.Number_equation_Spanish    = string.Format("{0} {1} {2} = ?", number.Number_1_Spanish, ConvertEnums.ConvertMathOperation_Spanish(operation), number.Number_2_Spanish);
                number.Number_equation_Portuguese = string.Format("{0} {1} {2} = ?", number.Number_1_Portuguese, ConvertEnums.ConvertMathOperation_Portuguese(operation), number.Number_2_Portuguese);
                number.Number_equation_German     = string.Format("{0} {1} {2} = ?", number.Number_1_German, ConvertEnums.ConvertMathOperation_German(operation), number.Number_2_German);
            }
            return(number);
        }
        public RecommendationsModel Get()
        {
            string userId = GetUser();


            var points = Context.UsersPoints.Where(v => v.User.Id == userId)
                         .Select(s => new { s.ListeningPoints, s.WritingPoints, s.SpeakingPoints }).FirstOrDefault();

            if (userId == null || points == null)
            {
                var video = _videoModelBuilder.Build(Context.Videos.OrderBy(o => o.Level).ThenBy(o => o.Id).FirstOrDefault());
                return(new RecommendationsModel
                {
                    ListeningRecommendation = video,
                    WritingRecommendation = video,
                    SpeakingRecommendation = video
                });
            }

            Enums.Level listeningLevel = PointsLevel.GetLevel((int)points.ListeningPoints);
            Enums.Level writingLevel   = PointsLevel.GetLevel((int)points.WritingPoints);
            Enums.Level speakingLevel  = PointsLevel.GetLevel((int)points.SpeakingPoints);


            var videoForListening = (from a in Context.Videos.Where(l => l.Level >= (int)listeningLevel)
                                     join b in Context.UserProgress
                                     .Where(w => w.User.Id == userId)
                                     on a equals b.Video into joined
                                     from j in joined.DefaultIfEmpty().Where(v => v.ListeningModulePassed != true || v.ListeningModulePassed == null)
                                     select new VideoModel
            {
                Id = a.Id,
                Language = a.Language,
                Level = a.Level,
                Thumbnail = a.Thumbnail,
                Title = a.Title,
                Url = a.Url,
                ListeningModulePassed = j.ListeningModulePassed,
                WritingModulePassed = j.WritingModulePassed
            }).OrderBy(o => o.Level).ThenByDescending(o => o.WritingModulePassed).ThenBy(o => o.Id).FirstOrDefault();

            var videoForWriting = (from a in Context.Videos.Where(l => l.Level >= (int)writingLevel)
                                   join b in Context.UserProgress
                                   .Where(w => w.User.Id == userId)
                                   on a equals b.Video into joined
                                   from j in joined.DefaultIfEmpty().Where(v => v.WritingModulePassed != true || v.WritingModulePassed == null)
                                   select new VideoModel
            {
                Id = a.Id,
                Language = a.Language,
                Level = a.Level,
                Thumbnail = a.Thumbnail,
                Title = a.Title,
                Url = a.Url,
                ListeningModulePassed = j.ListeningModulePassed,
                WritingModulePassed = j.WritingModulePassed
            }).OrderBy(o => o.Level).ThenByDescending(o => o.ListeningModulePassed).ThenBy(o => o.Id).FirstOrDefault();


            var videoForSpeaking = (from a in Context.Videos.Where(l => l.Level >= (int)speakingLevel)
                                    join b in Context.UserProgress
                                    .Where(w => w.User.Id == userId)
                                    on a equals b.Video into joined
                                    from j in joined.DefaultIfEmpty().Where(v => v.SpeakingModulePassed != true || v.SpeakingModulePassed == null)
                                    select new VideoModel
            {
                Id = a.Id,
                Language = a.Language,
                Level = a.Level,
                Thumbnail = a.Thumbnail,
                Title = a.Title,
                Url = a.Url,
                ListeningModulePassed = j.ListeningModulePassed,
                WritingModulePassed = j.WritingModulePassed
            }).OrderBy(o => o.Level).ThenByDescending(o => o.ListeningModulePassed).ThenByDescending(o => o.WritingModulePassed).ThenBy(o => o.Id).FirstOrDefault();

            int arithmeticMean = ((int)points.ListeningPoints + (int)points.WritingPoints) / 2;

            Enums.Level level = PointsLevel.GetLevel(arithmeticMean);

            RecommendationsModel recommendations = new RecommendationsModel
            {
                ListeningRecommendation = videoForListening,
                WritingRecommendation   = videoForWriting,
                SpeakingRecommendation  = videoForSpeaking
            };



            return(recommendations);
        }
Beispiel #10
0
        public void ManageLevels(Vector2 PlayerPos)
        {
            if (TutorialRectangle.Contains(PlayerPos))
            {
                currentLevel = Enums.Level.TUTORIAL;
            }
            if (GreenhouseRectangle.Contains(PlayerPos))
            {
                currentLevel = Enums.Level.GREENHOUSE;
            }
            if (HubRectangle.Contains(PlayerPos))
            {
                currentLevel = Enums.Level.HUB;
            }
            if (AntRectangle.Contains(PlayerPos))
            {
                currentLevel = Enums.Level.ANTCAVE;
            }
            if (TreeRectangle.Contains(PlayerPos))
            {
                currentLevel = Enums.Level.TREE;
            }
            if (CrownRectangle.Contains(PlayerPos))
            {
                currentLevel = Enums.Level.CROWN;
            }

            if (TutHubBorderRectangle.Contains(PlayerPos) && !TutToHub)
            {
                currentLevelGameObjects.Clear();
                foreach (GameObject gameObject in HubGameObjects)
                {
                    currentLevelGameObjects.Add(gameObject);
                }
                foreach (GameObject GameObject in InterLevelGameObjects)
                {
                    currentLevelGameObjects.Add(GameObject);
                }
                TutToHub = true;
            }


            if (HubToGreenRectangle.Contains(PlayerPos) && !GreenToHubRectangle.Contains(PlayerPos) && !HubToGreen)
            {
                currentLevelGameObjects.Clear();
                foreach (GameObject gameObject in GreenHouseGameObjects)
                {
                    currentLevelGameObjects.Add(gameObject);
                }
                foreach (GameObject GameObject in InterLevelGameObjects)
                {
                    currentLevelGameObjects.Add(GameObject);
                }
                HubToGreen = true;
                GreenToHub = false;
            }


            if (GreenToHubRectangle.Contains(PlayerPos) && !HubToGreenRectangle.Contains(PlayerPos) && !GreenToHub)
            {
                currentLevelGameObjects.Clear();
                foreach (GameObject gameObject in HubGameObjects)
                {
                    currentLevelGameObjects.Add(gameObject);
                }
                foreach (GameObject GameObject in InterLevelGameObjects)
                {
                    currentLevelGameObjects.Add(GameObject);
                }
                GreenToHub = true;
                HubToGreen = false;
            }



            if (GreenToTreeRectangle.Contains(PlayerPos) && !GreenToTree)
            {
                currentLevelGameObjects.Clear();
                foreach (GameObject gameObject in TreeGameObjects)
                {
                    currentLevelGameObjects.Add(gameObject);
                }
                foreach (GameObject GameObject in InterLevelGameObjects)
                {
                    currentLevelGameObjects.Add(GameObject);
                }
                GreenToTree = true;
                TreeToGreen = false;
            }

            if (TreeToGreenRectangle.Contains(PlayerPos) && !TreeToGreen)
            {
                currentLevelGameObjects.Clear();
                foreach (GameObject gameObject in GreenHouseGameObjects)
                {
                    currentLevelGameObjects.Add(gameObject);
                }
                foreach (GameObject GameObject in InterLevelGameObjects)
                {
                    currentLevelGameObjects.Add(GameObject);
                }
                TreeToGreen = true;
                GreenToTree = false;
            }



            if (HubToAntRectangle.Contains(PlayerPos) && !HubToAnt)
            {
                currentLevelGameObjects.Clear();
                foreach (GameObject gameObject in AntGameObjects)
                {
                    currentLevelGameObjects.Add(gameObject);
                }
                foreach (GameObject GameObject in InterLevelGameObjects)
                {
                    currentLevelGameObjects.Add(GameObject);
                }
                HubToAnt = true;
                AntToHub = false;
            }

            if (AntToHubRectangle.Contains(PlayerPos) && !AntToHub)
            {
                currentLevelGameObjects.Clear();
                foreach (GameObject gameObject in HubGameObjects)
                {
                    currentLevelGameObjects.Add(gameObject);
                }
                foreach (GameObject GameObject in InterLevelGameObjects)
                {
                    currentLevelGameObjects.Add(GameObject);
                }
                AntToHub = true;
                HubToAnt = false;
            }

            if (AntToTreeRectangle.Contains(PlayerPos) && !AntToTree)
            {
                currentLevelGameObjects.Clear();
                foreach (GameObject gameObject in TreeGameObjects)
                {
                    currentLevelGameObjects.Add(gameObject);
                }
                foreach (GameObject GameObject in InterLevelGameObjects)
                {
                    currentLevelGameObjects.Add(GameObject);
                }
                AntToTree = true;
                TreeToAnt = false;
            }

            if (TreeToAntRectangle.Contains(PlayerPos) && !TreeToAnt)
            {
                currentLevelGameObjects.Clear();
                foreach (GameObject gameObject in AntGameObjects)
                {
                    currentLevelGameObjects.Add(gameObject);
                }
                foreach (GameObject GameObject in InterLevelGameObjects)
                {
                    currentLevelGameObjects.Add(GameObject);
                }
                TreeToAnt = true;
                AntToTree = false;
            }

            //if (GazeboRectangle.Contains(PlayerPos))
            //{
            //    Camera.enableCameraMovement = false;

            //    Game1.cameraOffset = new Vector2(5000, 8000);
            //    Camera.zoom = 0.05f;
            //}
            //else
            //{
            //    Camera.enableCameraMovement = true;
            //    //Game1.cameraOffset = new Vector2(0, 0);
            //    Camera.zoom = 1f;
            //}
        }
Beispiel #11
0
        public void SpawnEnemyOffScreen(Player wormPlayer, List <Platform> platformList, ref List <Enemy> enemyList, Dictionary <string, Texture2D> enemySpriteSheets, Enums.Level currentLevel)
        {
            for (int i = 0; i < platformList.Count; i++)
            {
                if (!platformList[i].enemySpawnCheck)
                {
                    if (platformList[i].gameObjectPosition.X <wormPlayer.gameObjectPosition.X + 1250 && platformList[i].gameObjectRectangle.Right> wormPlayer.gameObjectPosition.X - 1250 && platformList[i].gameObjectPosition.Y <wormPlayer.gameObjectPosition.Y + 750 && platformList[i].gameObjectRectangle.Bottom> wormPlayer.gameObjectPosition.Y - 750)
                    {
                        platformList[i].enemySpawnCheck = true;
                    }
                    if ((platformList[i].gameObjectPosition.X <wormPlayer.gameObjectPosition.X + 1250 && platformList[i].gameObjectPosition.X> wormPlayer.gameObjectPosition.X + 900) || (platformList[i].gameObjectRectangle.Right > wormPlayer.gameObjectPosition.X - 1250 && platformList[i].gameObjectRectangle.Right < wormPlayer.gameObjectPosition.X - 900) &&
                        (platformList[i].gameObjectPosition.Y <wormPlayer.gameObjectPosition.Y + 800 && platformList[i].gameObjectPosition.Y> wormPlayer.gameObjectPosition.Y + 550) || (platformList[i].gameObjectRectangle.Bottom > wormPlayer.gameObjectPosition.Y - 1000 && platformList[i].gameObjectRectangle.Bottom < wormPlayer.gameObjectPosition.Y - 550))
                    {
                        // if(enemyList.Count() < 10)
                        {
                            platformList[i].enemySpawnCheck = true;
                            Random rand = new Random();

                            int randomizedNumber = rand.Next(0, 100);
                            if (randomizedNumber % 4 == 0 && platformList[i].canSpawnEnemy)
                            {
                                // if (currentLevel == Enums.Level.ANTCAVE)
                                enemyList.Add(new Snail(null, new Vector2(100, 50), new Vector2(platformList[i].gameObjectPosition.X + (platformList[i].gameObjectSize.X / 2), platformList[i].gameObjectPosition.Y - 50), (int)Enums.ObjectsID.SNAIL, enemySpriteSheets));

                                if (enemyList.Count() != 0)
                                {
                                    enemyList.Last().SetPlayer(wormPlayer);
                                }
                            }
                            if (randomizedNumber % 4 == 1 && platformList[i].canSpawnEnemy)
                            {
                                // if (currentLevel == Enums.Level.ANTCAVE)
                                enemyList.Add(new Spider(null, new Vector2(100, 50), new Vector2(platformList[i].gameObjectPosition.X + (platformList[i].gameObjectSize.X / 2), platformList[i].gameObjectPosition.Y - 50), (int)Enums.ObjectsID.SPIDER, enemySpriteSheets));

                                if (enemyList.Count() != 0)
                                {
                                    enemyList.Last().SetPlayer(wormPlayer);
                                }
                            }
                            if (randomizedNumber % 4 == 2 && platformList[i].canSpawnEnemy)
                            {
                                // if (currentLevel == Enums.Level.ANTCAVE)
                                enemyList.Add(new Ladybug(null, new Vector2(100, 50), new Vector2(platformList[i].gameObjectPosition.X + (platformList[i].gameObjectSize.X / 2), platformList[i].gameObjectPosition.Y - 50), (int)Enums.ObjectsID.LADYBUG, enemySpriteSheets));

                                if (enemyList.Count() != 0)
                                {
                                    enemyList.Last().SetPlayer(wormPlayer);
                                }
                            }
                        }
                    }
                }
            }
        }