Beispiel #1
0
        /// <summary>
        /// Metodo che ritorna la lista dei luoghi in cui è possibile trovare il Pokémon specificato
        /// </summary>
        /// <param name="index">Numero di indice del Pokémon da cercare</param>
        /// <returns>Lista dei luoghi</returns>
        public List <PokemonPlace> GetPlacesOfPokemon(int index)
        {
            List <PokemonPlace> places = new List <PokemonPlace>();
            string gioco = "";
            //if (ProgramManager.DexActive)
            //    gioco = ProgramManager.GetGameName();
            ProgramManager pm = ProgramManager.Instance;

            foreach (PokemonPlace p in placeList)
            {
                if (p.PokemonNumber == index)
                {
                    if (pm.DexActive && !p.Game.Contains(gioco))
                    {
                        continue;
                    }
                    places.Add(p);
                }
            }
            return(places);
        }
Beispiel #2
0
        /// <summary>
        /// Metodo che ritorna la lista dei Pokémon nel luogo specificato
        /// </summary>
        /// <param name="location">Luogo</param>
        /// <param name="region">Regione del luogo</param>
        /// <returns>Lista dei Pokémon che vi si trovano</returns>
        public List <PokemonPlace> GetPokemonInPlace(string location, string region)
        {
            List <PokemonPlace> places = new List <PokemonPlace>();
            string gioco = "";
            //if (ProgramManager.DexActive)
            //    gioco = ProgramManager.GetGameName();

            ProgramManager pm = ProgramManager.Instance;

            foreach (PokemonPlace p in placeList)
            {
                if (p.Region == region && p.LocationName == location)
                {
                    if (pm.DexActive && !p.Game.Contains(gioco))
                    {
                        continue;
                    }

                    places.Add(p);
                }
            }
            return(places);
        }