Ejemplo n.º 1
0
        public async Task Xy(Area area, int line)
        {
            var newLine = line / 5;

            for (int x = 0; x < 5; x++)
            {
                for (int y = 0; y < 5; y++)
                {
                    var posX = area.PosX.Value + (x * newLine);
                    var posY = area.PosY.Value + (y * newLine);

                    await this.Explore(new Area(posX, posY, newLine, newLine))
                    .ContinueWith((result) =>
                    {
                        if (result.Result.Amount >= result.Result.Area.SizeX * result.Result.Area.SizeY * 0.05)
                        {
                            searchQueue.TryAdd(result.Result);
                        }
                    });
                }
            }
        }