/// <summary> /// Retorna uma lista contendo todos os temas geradores e suas palavras. /// </summary> /// <returns></returns> public static List <GeneratorTheme> readAllThemes() { ThemesReader themesReader = new ThemesReader(BrincarConsts.getThemesPath()); List <GeneratorTheme> themes = themesReader.readThemes(); return(themes); }
/// <summary> /// Retorna um tema gerador aleatório do arquivo GeneratorTheme.bin. /// </summary> /// <returns></returns> public static GeneratorTheme readTheme() { ThemesReader themesReader = new ThemesReader(BrincarConsts.getThemesPath()); List <GeneratorTheme> themes = themesReader.readThemes(); Random generator = new Random(); int pos = generator.Next(themes.Count); return(themes[pos]); }