コード例 #1
0
        private List <Point> GetGoldAims()
        {
            var notAfk = FullBoard.GetOtherHeroes().Where(x => !PrevFullBoard.GetOtherHeroes().Contains(x)).ToList();
            var aims   = FullBoard.GetGold()
                         .Where(x => x.GetLengthTo(FullBoard.GetMe()) < Constants.GoldRadius * 2 &&
                                !FullBoard.IsInDanger(x, PrevFullBoard) && !FullBoard.IsAt(x, Element.LASER_DOWN, Element.LASER_LEFT, Element.LASER_UP, Element.LASER_RIGHT) &&
                                FullBoard.GetPathFromHero(x, PrevFullBoard)?.Length < Constants.GoldRadius &&
                                notAfk.All(othetHero => FullBoard.GetPath(othetHero, x, PrevFullBoard)?.Length >= FullBoard.GetPathFromHero(x, PrevFullBoard)?.Length))
                         .ToList();

            return(aims);
        }