コード例 #1
0
        private List <Point> GetZombieAims()
        {
            var target = FullBoard.GetZombies().Where(x => x.GetLengthTo(FullBoard.GetMe()) <= 5).ToList();
            var aims   = new List <Point>();

            aims.AddRange(target.Select(x => x.ShiftLeft().ShiftLeft()).Where(x => !FullBoard.IsHeroBarrierAt(x) && !FullBoard.IsInDanger(x, PrevFullBoard) && !FullBoard.IsAt(x, Element.LASER_DOWN, Element.LASER_LEFT, Element.LASER_UP, Element.LASER_RIGHT)));
            aims.AddRange(target.Select(x => x.ShiftRight().ShiftRight()).Where(x => !FullBoard.IsHeroBarrierAt(x) && !FullBoard.IsInDanger(x, PrevFullBoard) && !FullBoard.IsAt(x, Element.LASER_DOWN, Element.LASER_LEFT, Element.LASER_UP, Element.LASER_RIGHT)));
            aims.AddRange(target.Select(x => x.ShiftLeft().ShiftLeft()).Where(x => !FullBoard.IsHeroBarrierAt(x) && !FullBoard.IsInDanger(x, PrevFullBoard) && !FullBoard.IsAt(x, Element.LASER_DOWN, Element.LASER_LEFT, Element.LASER_UP, Element.LASER_RIGHT)));
            aims.AddRange(target.Select(x => x.ShiftRight().ShiftRight()).Where(x => !FullBoard.IsHeroBarrierAt(x) && !FullBoard.IsInDanger(x, PrevFullBoard) && !FullBoard.IsAt(x, Element.LASER_DOWN, Element.LASER_LEFT, Element.LASER_UP, Element.LASER_RIGHT)));
            return(aims);
        }