Exemplo n.º 1
0
        private void addNewMinigame(JObject projectIdResult, MINIGAME_TYPE type, String title, String description)
        {
            Minigame mg = new Minigame(projectIdResult, type, title, description);

            if(!minigameDictionary.Keys.Contains(type))
            {
                minigameDictionary[type] = new List<Minigame>();
            }

            minigameDictionary[type].Add(mg);
        }
Exemplo n.º 2
0
 public Minigame(JObject dataModel,MINIGAME_TYPE minigameType, String minigameTitle, String minigameDescription)
 {
     list = new List<ShoopDoup.Models.DataObject>();
     if (dataModel != null)
     {
         parseDataModel(dataModel);
     }
     title = minigameTitle;
     description = minigameDescription;
     type = minigameType;
 }
Exemplo n.º 3
0
        /*public Minigame getDefaultMinigame()
        {
            Minigame defaultGame = new Minigame(null, MINIGAME_TYPE.Binary, "Catch the Object", "Catch the correct object");
            defaultGame.setController(new NetGameController(null, "", ""));
            defaultGame.getController().parentController = mainController;
            return defaultGame;
        }*/
        public Minigame getMinigameOfType(MINIGAME_TYPE type)
        {
            if (minigameDictionary[type] != null)
            {
                int numGames = minigameDictionary[type].Count;
                int randomNum = randomGen.Next(0, numGames);

                return minigameDictionary[type][randomNum];
            }

            return null;
        }
Exemplo n.º 4
0
 public void setType(MINIGAME_TYPE t)
 {
     type = t;
 }