Ejemplo n.º 1
0
        private async Task <IEnumerable <Func <bool> > > SearchAndEncounterPokemon()
        {
            var pokemon = await _pokemon.GetPokemon();

            var basePokemon = (await _pokemon.EncounterPokemon(pokemon)).ToList();
            var actionList  = basePokemon;

            if (_logicSettings.BurstMode)
            {
                var currentLat  = _navigation.CurrentLatitude;
                var currentLong = _navigation.CurrentLongitude;
                await Task.Delay(1000);

                var tl = await BurstCatch(currentLat, currentLong, .001, .001);

                //await Task.Delay(1000);
                //var bl = await BurstCatch(currentLat, currentLong, .001, -.001);
                //await Task.Delay(1000);
                //var tr = await BurstCatch(currentLat, currentLong, -.001, .001);
                //await Task.Delay(1000);
                var br = await BurstCatch(currentLat, currentLong, -.001, -.001);

                actionList.AddRange(tl);
                //actionList.AddRange(bl);
                //actionList.AddRange(tr);
                actionList.AddRange(br);
            }
            return(actionList);
        }
Ejemplo n.º 2
0
        public async Task <IEnumerable <Action> > BurstCatch(double currentX, double currentY, double modifierX, double modifierY)
        {
            await _navigation.TeleportToLocation(currentX + modifierX, currentY + modifierY);

            var pokemon = await _pokemon.GetPokemon();

            var encounters = await _pokemon.EncounterPokemon(pokemon);

            return(encounters);
        }