Пример #1
0
        public static void Go(Board map, Point Me, int i, ref Dictionary <Direction, int> DicisionPriority, ref int SetBombRate)
        {
            int Angle   = i * 90;
            var isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(0, -1).Rotate(Angle)));

            if (isBlock == Motivate.Clear)
            {
                DicisionPriority[(Direction)i] += 1;

                //новые два блока
                isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(1, -1).Rotate(Angle)));
                if ((isBlock == Motivate.MyBomb2) || (isBlock == Motivate.MyBomb543))
                {
                    isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(1, -2).Rotate(Angle)));
                    if ((isBlock == Motivate.MyBomb1) || (isBlock == Motivate.MyBomb2))
                    {
                        DicisionPriority[(Direction)i] -= 100;
                    }
                }

                isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(-1, -1).Rotate(Angle)));
                if ((isBlock == Motivate.MyBomb2) || (isBlock == Motivate.MyBomb543))
                {
                    isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(-1, -2).Rotate(Angle)));
                    if ((isBlock == Motivate.MyBomb1) || (isBlock == Motivate.MyBomb2))
                    {
                        DicisionPriority[(Direction)i] -= 100;
                    }
                }

                isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(1, -1).Rotate(Angle)));
                if ((isBlock == Motivate.Wall) || (isBlock == Motivate.DistroybleWall) || (isBlock == Motivate.Ghost) || (isBlock == Motivate.Bomb1) || (isBlock == Motivate.Bomb2) || (isBlock == Motivate.Bomb3) || (isBlock == Motivate.Bomb4) || (isBlock == Motivate.Bomb5) || (isBlock == Motivate.MyBomb543) || (isBlock == Motivate.MyBomb1) || (isBlock == Motivate.MyBomb2))
                {
                    isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(-1, -1).Rotate(Angle)));
                    if ((isBlock == Motivate.Wall) || (isBlock == Motivate.DistroybleWall) || (isBlock == Motivate.Ghost) || (isBlock == Motivate.Bomb1) || (isBlock == Motivate.Bomb2) || (isBlock == Motivate.Bomb3) || (isBlock == Motivate.Bomb4) || (isBlock == Motivate.Bomb5) || (isBlock == Motivate.MyBomb543) || (isBlock == Motivate.MyBomb1) || (isBlock == Motivate.MyBomb2))
                    {
                        DicisionPriority[(Direction)i] -= 30;
                    }
                }



                isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(1, -1).Rotate(Angle)));
                if (isBlock == Motivate.Clear)
                {
                    DicisionPriority[(Direction)i] += 2;
                }
                if (isBlock == Motivate.Ghost)
                {
                    DicisionPriority[(Direction)i] -= 4;
                }
                if (isBlock == Motivate.MyBomb2)
                {
                    DicisionPriority[(Direction)i] -= 15;
                }
                if (isBlock == Motivate.MyBomb1)
                {
                    DicisionPriority[(Direction)i] -= 100;
                }
                if ((isBlock == Motivate.Bomb1) || (isBlock == Motivate.Bomb2))
                {
                    DicisionPriority[(Direction)i] -= 4;
                }
                if ((isBlock == Motivate.Wall) || (isBlock == Motivate.DistroybleWall) || (isBlock == Motivate.TempLocker))
                {
                    DicisionPriority[(Direction)i] -= 1;
                }

                isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(-1, -1).Rotate(Angle)));
                if (isBlock == Motivate.Clear)
                {
                    DicisionPriority[(Direction)i] += 2;
                }
                if (isBlock == Motivate.Ghost)
                {
                    DicisionPriority[(Direction)i] -= 4;
                }
                if (isBlock == Motivate.MyBomb2)
                {
                    DicisionPriority[(Direction)i] -= 15;
                }
                if (isBlock == Motivate.MyBomb1)
                {
                    DicisionPriority[(Direction)i] -= 100;
                }
                if ((isBlock == Motivate.Bomb1) || (isBlock == Motivate.Bomb2))
                {
                    DicisionPriority[(Direction)i] -= 4;
                }
                if ((isBlock == Motivate.Wall) || (isBlock == Motivate.DistroybleWall) || (isBlock == Motivate.TempLocker))
                {
                    DicisionPriority[(Direction)i] -= 1;
                }



                isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(0, -2).Rotate(Angle)));
                if ((isBlock == Motivate.Wall) || (isBlock == Motivate.DistroybleWall) || (isBlock == Motivate.TempLocker))
                {
                    DicisionPriority[(Direction)i] -= 1;
                }
                if (isBlock == Motivate.Ghost)
                {
                    DicisionPriority[(Direction)i] -= 5;
                }
                if ((isBlock == Motivate.Bomb1) || (isBlock == Motivate.Bomb2))
                {
                    DicisionPriority[(Direction)i] -= 4;
                }
                if ((isBlock == Motivate.Bomb5) || (isBlock == Motivate.Bomb4) || (isBlock == Motivate.Bomb3))
                {
                    DicisionPriority[(Direction)i] -= 3;
                }
                if ((isBlock == Motivate.MyBomb1) || (isBlock == Motivate.MyBomb2))
                {
                    DicisionPriority[(Direction)i] -= 3;
                }
                if (isBlock == Motivate.OtherBomberman)
                {
                    DicisionPriority[(Direction)i] -= 1;
                }
                if (isBlock == Motivate.OtherBombBomberman)
                {
                    DicisionPriority[(Direction)i] -= 2;
                }



                if (isBlock == Motivate.Clear)
                {
                    DicisionPriority[(Direction)i] += 2;


                    isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(1, -2).Rotate(Angle)));
                    if (isBlock == Motivate.Clear)
                    {
                        DicisionPriority[(Direction)i] += 1;
                        isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(2, -2).Rotate(Angle)));
                        if (isBlock == Motivate.Clear)
                        {
                            DicisionPriority[(Direction)i] += 1;
                        }
                        if (isBlock == Motivate.Bomb1)
                        {
                            DicisionPriority[(Direction)i] -= 1;
                        }
                        if (isBlock == Motivate.MyBomb1)
                        {
                            DicisionPriority[(Direction)i] -= 1;
                        }
                    }
                    isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(1, -2).Rotate(Angle)));
                    if (isBlock == Motivate.Ghost)
                    {
                        DicisionPriority[(Direction)i] -= 2;
                    }
                    if ((isBlock == Motivate.MyBomb1) || (isBlock == Motivate.MyBomb2))
                    {
                        DicisionPriority[(Direction)i] -= 1;
                    }
                    if ((isBlock == Motivate.Bomb1) || (isBlock == Motivate.Bomb2))
                    {
                        DicisionPriority[(Direction)i] -= 1;
                    }
                    if ((isBlock == Motivate.Wall) || (isBlock == Motivate.DistroybleWall))
                    {
                        DicisionPriority[(Direction)i] -= 1;
                    }

                    isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(-1, -2).Rotate(Angle)));
                    if (isBlock == Motivate.Clear)
                    {
                        DicisionPriority[(Direction)i] += 1;
                        isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(-2, -2).Rotate(Angle)));
                        if (isBlock == Motivate.Clear)
                        {
                            DicisionPriority[(Direction)i] += 1;
                        }
                        if (isBlock == Motivate.Bomb1)
                        {
                            DicisionPriority[(Direction)i] -= 1;
                        }
                        if (isBlock == Motivate.MyBomb1)
                        {
                            DicisionPriority[(Direction)i] -= 1;
                        }
                    }
                    isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(-1, -2).Rotate(Angle)));
                    if (isBlock == Motivate.Ghost)
                    {
                        DicisionPriority[(Direction)i] -= 2;
                    }
                    if ((isBlock == Motivate.MyBomb1) || (isBlock == Motivate.MyBomb2))
                    {
                        DicisionPriority[(Direction)i] -= 1;
                    }
                    if ((isBlock == Motivate.Bomb1) || (isBlock == Motivate.Bomb2))
                    {
                        DicisionPriority[(Direction)i] -= 1;
                    }
                    if ((isBlock == Motivate.Wall) || (isBlock == Motivate.DistroybleWall))
                    {
                        DicisionPriority[(Direction)i] -= 1;
                    }



                    isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(0, -3).Rotate(Angle)));
                    if (isBlock == Motivate.Clear)
                    {
                        DicisionPriority[(Direction)i] += 3;
                    }
                    if ((isBlock == Motivate.Bomb1) || (isBlock == Motivate.Bomb2) || (isBlock == Motivate.MyBomb1) || (isBlock == Motivate.MyBomb2))
                    {
                        DicisionPriority[(Direction)i] -= 1;
                    }
                    if (isBlock == Motivate.Ghost)
                    {
                        DicisionPriority[(Direction)i] -= 2;
                    }
                    if (isBlock == Motivate.OtherBombBomberman)
                    {
                        DicisionPriority[(Direction)i] -= 1;
                    }

                    if (isBlock == Motivate.Clear)
                    {
                        isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(1, -3).Rotate(Angle)));
                        if (isBlock == Motivate.Clear)
                        {
                            DicisionPriority[(Direction)i] += 1;
                        }
                        if (isBlock == Motivate.Bomb1)
                        {
                            DicisionPriority[(Direction)i] -= 1;
                        }
                        if (isBlock == Motivate.MyBomb1)
                        {
                            DicisionPriority[(Direction)i] -= 1;
                        }

                        isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(-1, -3).Rotate(Angle)));
                        if (isBlock == Motivate.Clear)
                        {
                            DicisionPriority[(Direction)i] += 1;
                        }
                        if (isBlock == Motivate.Bomb1)
                        {
                            DicisionPriority[(Direction)i] -= 1;
                        }
                        if (isBlock == Motivate.MyBomb1)
                        {
                            DicisionPriority[(Direction)i] -= 1;
                        }

                        isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(0, -4).Rotate(Angle)));
                        if (isBlock == Motivate.Clear)
                        {
                            DicisionPriority[(Direction)i] += 3;
                        }
                        if ((isBlock == Motivate.Bomb1) || (isBlock == Motivate.Bomb2) || (isBlock == Motivate.MyBomb1) || (isBlock == Motivate.MyBomb2))
                        {
                            DicisionPriority[(Direction)i] -= 1;
                        }
                        if (isBlock == Motivate.Ghost)
                        {
                            DicisionPriority[(Direction)i] -= 1;
                        }
                    }
                }
            }
            else
            {
                DicisionPriority[(Direction)i] -= 10;
            }

            isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(0, -1).Rotate(Angle)));
            if ((isBlock == Motivate.Wall) || (isBlock == Motivate.DistroybleWall) || (isBlock == Motivate.TempLocker))
            {
                DicisionPriority[(Direction)i] -= 20;
            }
            if (isBlock == Motivate.Ghost)
            {
                DicisionPriority[(Direction)i] -= 50;
            }
            if ((isBlock == Motivate.Bomb1) || (isBlock == Motivate.Bomb5) || (isBlock == Motivate.Bomb4) || (isBlock == Motivate.Bomb3) || (isBlock == Motivate.Bomb2))
            {
                DicisionPriority[(Direction)i] -= 20;
            }
            if ((isBlock == Motivate.MyBomb1) || (isBlock == Motivate.MyBomb543) || (isBlock == Motivate.MyBomb2))
            {
                DicisionPriority[(Direction)i] -= 20;
            }
            if (isBlock == Motivate.OtherBomberman)
            {
                DicisionPriority[(Direction)i] -= 1;
            }
            if (isBlock == Motivate.OtherBombBomberman)
            {
                DicisionPriority[(Direction)i] -= 2;
            }
            if (isBlock == Motivate.Boom)
            {
                DicisionPriority[(Direction)i] -= 100;
            }

            isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(-1, 0).Rotate(Angle)));
            if (isBlock == Motivate.Boom)
            {
                DicisionPriority[(Direction)i] += 25;
            }
            isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(1, 0).Rotate(Angle)));
            if (isBlock == Motivate.Boom)
            {
                DicisionPriority[(Direction)i] += 25;
            }
        }
Пример #2
0
        protected override string DoAction(Board Map)
        {
            var   DicisionPriority = BrainCard.InitializeDictinory <Direction, int>();
            Point myBomberman      = Map.GetBomberman();
            var   _map             = Map.GetArea(myBomberman - VisibleArea, myBomberman + VisibleArea);
            //относительно моего бомбермена найти новый координаты для бомб.
            Point myAreaBomberman = _map.GetBomberman();

            foreach (var mab in MyBombList)
            {
                mab.LocalLocation = mab.Location - myBomberman + myAreaBomberman;
            }

            void ReplaceAll(Item Now, Item Next)
            {
                while (_map.Map.Contains((char)Now))
                {
                    _map.ReplaceObj(_map.Map.IndexOf((char)Now), Next);
                }
            }

            //движение людей
            ReplaceAll(Item.BOOM, Item.Space);
            ReplaceAll(Item.BOMB_TIMER_1, Item.BOOM);
            ReplaceAll(Item.BOMB_TIMER_2, Item.BOMB_TIMER_1);
            ReplaceAll(Item.BOMB_TIMER_3, Item.BOMB_TIMER_2);
            ReplaceAll(Item.BOMB_TIMER_4, Item.BOMB_TIMER_3);
            ReplaceAll(Item.BOMB_TIMER_5, Item.BOMB_TIMER_4);
            ReplaceAll(Item.DestroyedWall, Item.Space);
            ReplaceAll(Item.OTHER_DEAD_BOMBERMAN, Item.Space);
            ReplaceAll(Item.DeadMeatChopper, Item.Space);

            Queue <Point> BoomList = new Queue <Point>(_map.Get(Item.BOOM).ToArray());

            bool Expl(int i, int j)
            {
                bool breakpoint = true;
                var  it         = _map.GetAt(new Point(i, j));

                switch (it)
                {
                //case Item.OTHER_BOMBERMAN:
                //    _map.ReplaceObj(_map.CordsToIndx(i, j), Item.OTHER_DEAD_BOMBERMAN); break;
                case Item.DESTROYABLE_WALL:
                    _map.ReplaceObj(_map.CordsToIndx(i, j), Item.DestroyedWall); break;

                case Item.OTHER_BOMB_BOMBERMAN:
                case Item.BOMB_BOMBERMAN:
                case Item.BOMB_TIMER_1:
                case Item.BOMB_TIMER_2:
                case Item.BOMB_TIMER_3:
                case Item.BOMB_TIMER_4:
                case Item.BOMB_TIMER_5:
                {
                    _map.ReplaceObj(_map.CordsToIndx(i, j), Item.BOOM);
                    BoomList.Enqueue(new Point(i, j));
                    break;
                }

                case Item.Space:
                case Item.MEAT_CHOPPER:
                case Item.OTHER_BOMBERMAN:
                case Item.OTHER_DEAD_BOMBERMAN:
                case Item.DEAD_BOMBERMAN:
                case Item.BOMBERMAN:
                {
                    _map.ReplaceObj(_map.CordsToIndx(i, j), Item.BOOM);
                    breakpoint = false;
                    break;
                }

                case Item.BOOM:
                    breakpoint = false; break;
                }
                return(breakpoint);
            }

            while (BoomList.Count != 0)
            {
                var b = BoomList.Dequeue();
                for (int i = b.X; i > b.X - Board.BombSlpash; i--)
                {
                    if (Expl(i, b.Y))
                    {
                        break;
                    }
                }
                for (int j = b.Y; j > b.Y - Board.BombSlpash; j--)
                {
                    if (Expl(b.X, j))
                    {
                        break;
                    }
                }
                for (int i = b.X; i < b.X + Board.BombSlpash; i++)
                {
                    if (Expl(i, b.Y))
                    {
                        break;
                    }
                }
                for (int j = b.Y; j < b.Y + Board.BombSlpash; j++)
                {
                    if (Expl(b.X, j))
                    {
                        break;
                    }
                }
            }

            Item CheckMyBomb(Bomb bomb)
            {
                if (Map.GetAt(bomb.Location) == Item.BOOM)
                {
                    bomb.BOOM = true;
                }
                var isBlock = _map.GetAt(bomb.LocalLocation);

                switch (isBlock)
                {
                case Item.BOMB_TIMER_5: return(Item.MY_BOMB_TIMER_5);

                case Item.BOMB_TIMER_4: return(Item.MY_BOMB_TIMER_4);

                case Item.BOMB_TIMER_3: return(Item.MY_BOMB_TIMER_3);

                case Item.BOMB_TIMER_2: return(Item.MY_BOMB_TIMER_2);

                case Item.BOMB_TIMER_1: return(Item.MY_BOMB_TIMER_1);

                case Item.BOOM:
                {
                    bomb.BOOM = true;
                    return(Item.BOOM);
                }
                }
                return(isBlock);
            }

            foreach (var b in MyBombList)
            {
                var item = CheckMyBomb(b);
                if (item != Item.WALL)
                {
                    _map.ReplaceObj(_map.CordsToIndx(b.LocalLocation.X, b.LocalLocation.Y), item);
                }
            }
            MyBombList.RemoveAll((b) => b.BOOM = false);

            var GhostList = _map.Get(Item.MEAT_CHOPPER);

            foreach (var g in GhostList)
            {
                for (int i = 0; i < 360; i += 90)
                {
                    var dir = g + new Point(0, -1).Rotate(i);
                    if (_map.GetAt(dir) == Item.Space)
                    {
                        _map.ReplaceObj(_map.CordsToIndx(dir.X, dir.Y), Item.MEAT_CHOPPER);
                    }
                }
            }
            int SetBombRate = 0;

            for (int i = 0; i < 4; i++)
            {
                BotLogic.Go(_map, myAreaBomberman, i, ref DicisionPriority, ref SetBombRate);
            }

            if (OtherBomberAgressive > 0)
            {
                var NearBmber = Map.Nearest(Item.OTHER_BOMBERMAN, Item.OTHER_BOMB_BOMBERMAN);
                if (NearBmber.X > myBomberman.X)
                {
                    DicisionPriority[Direction.Right] += OtherBomberAgressive;
                }
                else
                {
                    DicisionPriority[Direction.Left] += OtherBomberAgressive;
                }
                if (NearBmber.Y > myBomberman.Y)
                {
                    DicisionPriority[Direction.Down] += OtherBomberAgressive;
                }
                else
                {
                    DicisionPriority[Direction.Up] += OtherBomberAgressive;
                }
            }
            if (GhostAgressive > 0)
            {
                var NearGhst = Map.Nearest(Item.MEAT_CHOPPER);
                if (NearGhst.X > myBomberman.X)
                {
                    DicisionPriority[Direction.Right] += GhostAgressive;
                }
                else
                {
                    DicisionPriority[Direction.Left] += GhostAgressive;
                }
                if (NearGhst.Y > myBomberman.Y)
                {
                    DicisionPriority[Direction.Down] += GhostAgressive;
                }
                else
                {
                    DicisionPriority[Direction.Up] += GhostAgressive;
                }
            }

            //int asd = 0;
            //Console.Clear();
            //while (asd < _map.Map.Length)
            //{
            //    Console.WriteLine(_map.Map.Substring(asd, _map.Width));
            //    asd += _map.Width;
            //}
            //Console.Write($"{DicisionPriority[(Direction)0].ToString()} {DicisionPriority[(Direction)1].ToString()} {DicisionPriority[(Direction)2].ToString()} {DicisionPriority[(Direction)3].ToString()} {SetBombRate.ToString()} ");

            Direction dicision = 0;
            double    tempMax  = 0;

            foreach (var key in DicisionPriority)
            {
                if (key.Value > tempMax)
                {
                    dicision = key.Key;
                    tempMax  = key.Value;
                }
            }

            string answer = tempMax == 0 ? BotAction.Stop.ToString() : dicision.ToString();

            for (int i = 0; i < 4; i++)
            {
                BotLogic.Set(_map, myAreaBomberman, i, ref SetBombRate);
            }
            if (SetBombRate >= SetBombPriority)
            {
                answer = answer.Insert(0, BotAction.Act.ToString());
                MyBombList.Add(new Bomb(myBomberman));
            }

            Console.Write($"{DicisionPriority[(Direction)0].ToString()} {DicisionPriority[(Direction)1].ToString()} {DicisionPriority[(Direction)2].ToString()} {DicisionPriority[(Direction)3].ToString()} {SetBombRate.ToString()} ");
            return(answer);
        }
Пример #3
0
        public static void Set(Board map, Point Me, int i, ref int SetBombRate)
        {
            int Answer  = 0;
            int Angle   = i * 90;
            var isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(0, -1).Rotate(Angle)));

            if (isBlock != Motivate.Wall)
            {
                isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(0, -2).Rotate(Angle)));

                if (isBlock == Motivate.OtherBombBomberman)
                {
                    Answer += 2;
                }
                if (isBlock == Motivate.OtherBomberman)
                {
                    Answer += 4;
                }
                if (isBlock == Motivate.Ghost)
                {
                    Answer += 2;
                }
                if ((isBlock == Motivate.Wall) || (isBlock == Motivate.DistroybleWall))
                {
                    Answer -= 1;
                }
                if (isBlock == Motivate.MyBomb1)
                {
                    Answer -= 50;
                }
                if (isBlock == Motivate.MyBomb2)
                {
                    Answer += 1;
                }
                if (isBlock == Motivate.MyBomb543)
                {
                    Answer += 2;
                }
                if ((isBlock == Motivate.Bomb1) || (isBlock == Motivate.Bomb2) || (isBlock == Motivate.Bomb3) || (isBlock == Motivate.Bomb4) || (isBlock == Motivate.Bomb5) || (isBlock == Motivate.Boom))
                {
                    Answer -= 150;
                }


                if (isBlock != Motivate.Wall)
                {
                    //2 горизонталь боковые
                    isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(1, -2).Rotate(Angle)));
                    if (isBlock == Motivate.OtherBombBomberman)
                    {
                        Answer += 1;
                    }
                    if (isBlock == Motivate.OtherBomberman)
                    {
                        Answer += 3;
                    }
                    if ((isBlock == Motivate.Bomb1) || (isBlock == Motivate.Bomb2) || (isBlock == Motivate.MyBomb1) || (isBlock == Motivate.MyBomb2))
                    {
                        Answer -= 2;
                    }
                    if (isBlock == Motivate.Ghost)
                    {
                        Answer += 1;
                    }
                    if (isBlock != Motivate.Wall)
                    {
                        Answer += 1;
                        //2 горизонталь дальние боковые
                        isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(2, -2).Rotate(Angle)));
                        if (isBlock == Motivate.Ghost)
                        {
                            Answer += 1;
                        }
                        if (isBlock == Motivate.OtherBomberman)
                        {
                            Answer += 1;
                        }
                    }
                    isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(-1, -2).Rotate(Angle)));
                    if (isBlock == Motivate.OtherBombBomberman)
                    {
                        Answer += 1;
                    }
                    if (isBlock == Motivate.OtherBomberman)
                    {
                        Answer += 3;
                    }
                    if ((isBlock == Motivate.Bomb1) || (isBlock == Motivate.Bomb2) || (isBlock == Motivate.MyBomb1) || (isBlock == Motivate.MyBomb2))
                    {
                        Answer -= 2;
                    }
                    if (isBlock == Motivate.Ghost)
                    {
                        Answer += 1;
                    }
                    if (isBlock != Motivate.Wall)
                    {
                        Answer += 1;
                        //2 горизонталь дальние боковые
                        isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(-2, -2).Rotate(Angle)));
                        if (isBlock == Motivate.Ghost)
                        {
                            Answer += 1;
                        }
                        if (isBlock == Motivate.OtherBomberman)
                        {
                            Answer += 1;
                        }
                    }


                    isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(0, -3).Rotate(Angle)));
                    if (isBlock == Motivate.OtherBombBomberman)
                    {
                        Answer += 1;
                    }
                    if (isBlock == Motivate.OtherBomberman)
                    {
                        Answer += 2;
                    }
                    if (isBlock == Motivate.MyBomb1)
                    {
                        Answer -= 50;
                    }
                    if (isBlock == Motivate.MyBomb2)
                    {
                        Answer += 1;
                    }
                    if (isBlock == Motivate.MyBomb543)
                    {
                        Answer += 2;
                    }
                    if ((isBlock == Motivate.Bomb1) || (isBlock == Motivate.Bomb2) || (isBlock == Motivate.Bomb3) || (isBlock == Motivate.Bomb4) || (isBlock == Motivate.Bomb5) || (isBlock == Motivate.Boom))
                    {
                        Answer -= 150;
                    }
                    if (isBlock != Motivate.Wall)
                    {
                        //3 горизонталь боковые
                        isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(1, -3).Rotate(Angle)));
                        if (isBlock == Motivate.Clear)
                        {
                            Answer += 1;
                        }
                        if (isBlock == Motivate.OtherBomberman)
                        {
                            Answer += 1;
                        }
                        if (isBlock == Motivate.OtherBombBomberman)
                        {
                            Answer += 1;
                        }
                        if (isBlock == Motivate.Ghost)
                        {
                            Answer += 1;
                        }

                        isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(-1, -3).Rotate(Angle)));
                        if (isBlock == Motivate.Clear)
                        {
                            Answer += 1;
                        }
                        if (isBlock == Motivate.OtherBomberman)
                        {
                            Answer += 1;
                        }
                        if (isBlock == Motivate.OtherBombBomberman)
                        {
                            Answer += 1;
                        }
                        if (isBlock == Motivate.Ghost)
                        {
                            Answer += 1;
                        }

                        //расстояние -4
                        isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(0, -4).Rotate(Angle)));
                        if (isBlock == Motivate.Clear)
                        {
                            Answer += 1;
                        }
                        if (isBlock == Motivate.Ghost)
                        {
                            Answer += 1;
                        }
                        if (isBlock == Motivate.OtherBombBomberman)
                        {
                            Answer += 1;
                        }
                        if (isBlock == Motivate.OtherBomberman)
                        {
                            Answer += 1;
                        }
                        if ((isBlock == Motivate.Bomb1) || (isBlock == Motivate.Bomb2) || (isBlock == Motivate.Bomb3))
                        {
                            Answer -= 2;
                        }
                        if ((isBlock == Motivate.Bomb4) || (isBlock == Motivate.Bomb5))
                        {
                            Answer -= 1;
                        }
                        if ((isBlock == Motivate.MyBomb2) || (isBlock == Motivate.MyBomb1))
                        {
                            Answer -= 150;
                        }
                    }
                    //при расстоянии -2
                }
                //при расстоянии -1
                //1 горизонталь бока
                isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(1, -1).Rotate(Angle)));
                if (isBlock == Motivate.Clear)
                {
                    Answer += 1;
                }
                if (isBlock == Motivate.DistroybleWall)
                {
                    Answer += 1;
                }
                if (isBlock == Motivate.OtherBomberman)
                {
                    Answer += 1;
                }
                if (isBlock == Motivate.OtherBombBomberman)
                {
                    Answer += 1;
                }
                if (isBlock == Motivate.Ghost)
                {
                    Answer += 1;
                }

                isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(-1, -1).Rotate(Angle)));
                if (isBlock == Motivate.Clear)
                {
                    Answer += 1;
                }
                if (isBlock == Motivate.DistroybleWall)
                {
                    Answer += 1;
                }
                if (isBlock == Motivate.OtherBomberman)
                {
                    Answer += 1;
                }
                if (isBlock == Motivate.OtherBombBomberman)
                {
                    Answer += 1;
                }
                if (isBlock == Motivate.Ghost)
                {
                    Answer += 1;
                }
            }
            //когда что-то стоит вплотную
            isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(0, -1).Rotate(Angle)));
            if (isBlock == Motivate.DistroybleWall)
            {
                Answer += 1;
            }
            if ((isBlock == Motivate.Bomb1) || (isBlock == Motivate.Bomb2) || (isBlock == Motivate.Bomb3) || (isBlock == Motivate.Bomb4) || (isBlock == Motivate.Bomb5) || (isBlock == Motivate.Boom))
            {
                Answer -= 150;
            }
            if ((isBlock == Motivate.OtherBomberman) || (isBlock == Motivate.OtherBombBomberman))
            {
                Answer += 10;
            }
            if (isBlock == Motivate.MyBomb543)
            {
                Answer += 2;
            }
            if (isBlock == Motivate.MyBomb1)
            {
                Answer -= 50;
            }
            if (isBlock == Motivate.Ghost)
            {
                Answer += 1;
            }

            isBlock = BrainCard.GetMotivate(map.GetAt(Me));
            if (isBlock == Motivate.Boom)
            {
                Answer -= 150;
            }

            isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(0, -1).Rotate(Angle)));
            if (isBlock == Motivate.MyBomb543)
            {
                isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(1, -1).Rotate(Angle)));
                if (isBlock == Motivate.MyBomb543)
                {
                    isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(2, -1).Rotate(Angle)));
                    if (isBlock == Motivate.MyBomb2 || isBlock == Motivate.MyBomb1)
                    {
                        Answer -= 100;
                    }
                    isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(1, -2).Rotate(Angle)));
                    if (isBlock == Motivate.MyBomb2 || isBlock == Motivate.MyBomb1)
                    {
                        Answer -= 100;
                    }
                }
            }

            isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(0, -1).Rotate(Angle)));
            if (isBlock == Motivate.MyBomb543)
            {
                isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(-1, -1).Rotate(Angle)));
                if (isBlock == Motivate.MyBomb543)
                {
                    isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(-2, -1).Rotate(Angle)));
                    if (isBlock == Motivate.MyBomb2 || isBlock == Motivate.MyBomb1)
                    {
                        Answer -= 100;
                    }
                    isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(-1, -2).Rotate(Angle)));
                    if (isBlock == Motivate.MyBomb2 || isBlock == Motivate.MyBomb1)
                    {
                        Answer -= 100;
                    }
                }
            }


            isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(0, -1).Rotate(Angle)));
            if (isBlock == Motivate.MyBomb543)
            {
                isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(0, -2).Rotate(Angle)));
                if (isBlock == Motivate.MyBomb543)
                {
                    isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(1, -2).Rotate(Angle)));
                    if (isBlock == Motivate.MyBomb2 || isBlock == Motivate.MyBomb1)
                    {
                        Answer -= 100;
                    }
                    isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(-1, -2).Rotate(Angle)));
                    if (isBlock == Motivate.MyBomb2 || isBlock == Motivate.MyBomb1)
                    {
                        Answer -= 100;
                    }
                }
            }


            isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(0, -1).Rotate(Angle)));
            if (isBlock == Motivate.MyBomb543)
            {
                isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(1, -1).Rotate(Angle)));
                if (isBlock == Motivate.MyBomb543)
                {
                    isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(1, 0).Rotate(Angle)));
                    if (isBlock == Motivate.MyBomb2 || isBlock == Motivate.MyBomb1)
                    {
                        Answer -= 100;
                    }
                    isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(-1, -2).Rotate(Angle)));
                    if (isBlock == Motivate.MyBomb2 || isBlock == Motivate.MyBomb1)
                    {
                        Answer -= 100;
                    }
                }
            }


            isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(1, -1).Rotate(Angle)));
            if ((isBlock == Motivate.Wall) || (isBlock == Motivate.DistroybleWall) || (isBlock == Motivate.Ghost) || (isBlock == Motivate.Bomb1) || (isBlock == Motivate.Bomb2) || (isBlock == Motivate.Bomb3) || (isBlock == Motivate.Bomb4) || (isBlock == Motivate.Bomb5) || (isBlock == Motivate.MyBomb543) || (isBlock == Motivate.MyBomb1) || (isBlock == Motivate.MyBomb2))
            {
                isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(-1, -1).Rotate(Angle)));
                if ((isBlock == Motivate.Wall) || (isBlock == Motivate.DistroybleWall) || (isBlock == Motivate.Ghost) || (isBlock == Motivate.Bomb1) || (isBlock == Motivate.Bomb2) || (isBlock == Motivate.Bomb3) || (isBlock == Motivate.Bomb4) || (isBlock == Motivate.Bomb5) || (isBlock == Motivate.MyBomb543) || (isBlock == Motivate.MyBomb1) || (isBlock == Motivate.MyBomb2))
                {
                    Answer -= 2;
                }
            }
            if ((BrainCard.GetMotivate(map.GetAt(Me + new Point(0, -1))) != Motivate.Clear) &&
                (BrainCard.GetMotivate(map.GetAt(Me + new Point(0, 1))) != Motivate.Clear) &&
                (BrainCard.GetMotivate(map.GetAt(Me + new Point(-1, 0))) != Motivate.Clear) &&
                (BrainCard.GetMotivate(map.GetAt(Me + new Point(1, 0))) != Motivate.Clear) &&
                (BrainCard.GetMotivate(map.GetAt(Me)) == Motivate.Boom))
            {
                Answer += 10000;
            }

            //сложная конструкция с проверкой угла после ряда бомб
            isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(0, -1).Rotate(Angle)));
            if (isBlock == Motivate.Clear)
            {
                isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(-1, 0).Rotate(Angle)));
                if ((isBlock == Motivate.MyBomb1) || (isBlock == Motivate.MyBomb2) || (isBlock == Motivate.MyBomb543))
                {
                    isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(1, -1).Rotate(Angle)));
                    if ((isBlock == Motivate.MyBomb1) || (isBlock == Motivate.MyBomb2) || (isBlock == Motivate.MyBomb543) || (isBlock == Motivate.Wall) || (isBlock == Motivate.DistroybleWall) || (isBlock == Motivate.Bomb2) || (isBlock == Motivate.Bomb3) || (isBlock == Motivate.Bomb1))
                    {
                        Answer -= 55;
                    }
                }
            }


            isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(0, -1).Rotate(Angle)));
            if (isBlock == Motivate.Clear)
            {
                isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(1, 0).Rotate(Angle)));
                if ((isBlock == Motivate.MyBomb1) || (isBlock == Motivate.MyBomb2) || (isBlock == Motivate.MyBomb543))
                {
                    isBlock = BrainCard.GetMotivate(map.GetAt(Me + new Point(-1, -1).Rotate(Angle)));
                    if ((isBlock == Motivate.MyBomb1) || (isBlock == Motivate.MyBomb2) || (isBlock == Motivate.MyBomb543) || (isBlock == Motivate.Wall) || (isBlock == Motivate.DistroybleWall) || (isBlock == Motivate.Bomb2) || (isBlock == Motivate.Bomb3) || (isBlock == Motivate.Bomb1))
                    {
                        Answer -= 55;
                    }
                }
            }

            if ((BrainCard.GetMotivate(map.GetAt(Me + new Point(0, -1))) != Motivate.Clear) &&
                (BrainCard.GetMotivate(map.GetAt(Me + new Point(0, 1))) != Motivate.Clear) &&
                (BrainCard.GetMotivate(map.GetAt(Me + new Point(-1, 0))) != Motivate.Clear) &&
                (BrainCard.GetMotivate(map.GetAt(Me + new Point(1, 0))) != Motivate.Clear) &&
                (BrainCard.GetMotivate(map.GetAt(Me)) == Motivate.Boom))
            {
                Answer += 10000;
            }

            if (((BrainCard.GetMotivate(map.GetAt(Me + new Point(0, -1))) == Motivate.Wall) || (BrainCard.GetMotivate(map.GetAt(Me + new Point(0, -1))) == Motivate.DistroybleWall)) &&
                ((BrainCard.GetMotivate(map.GetAt(Me + new Point(0, 1))) == Motivate.Wall) || (BrainCard.GetMotivate(map.GetAt(Me + new Point(0, 1))) == Motivate.DistroybleWall)) &&
                ((BrainCard.GetMotivate(map.GetAt(Me + new Point(-1, 0))) == Motivate.Wall) || (BrainCard.GetMotivate(map.GetAt(Me + new Point(-1, 0))) == Motivate.DistroybleWall)) &&
                ((BrainCard.GetMotivate(map.GetAt(Me + new Point(1, 0))) == Motivate.Wall) || (BrainCard.GetMotivate(map.GetAt(Me + new Point(1, 0))) == Motivate.DistroybleWall)))
            {
                Answer += 10000;
            }


            SetBombRate += Answer;
            //Console.Write($"{Answer.ToString()} ");
        }