Example #1
0
        public void PutBomb()
        {
            Point playerPoint = player.MyNowPoint();

            if (map[playerPoint.X, playerPoint.Y] == Sost.бомба)
            {
                return;
            }
            if (player.PutBomb(mapPic, Babah))
            {
                ChangeSost(player.MyNowPoint(), Sost.бомба);
            }
        }
Example #2
0
        private void GetNewPlace()
        {
            if (level >= 3)
            {
                destinePlace = player.MyNowPoint();
                if (FindPath())
                {
                    return;
                }
            }
            int loop = 0;

            do
            {
                destinePlace.X = rand.Next(1, map.GetLength(0) - 1);
                destinePlace.Y = rand.Next(1, map.GetLength(1) - 1);
            } while (!FindPath() && loop++ < 100);
            if (loop >= 100)
            {
                destinePlace = mobPlace;
            }
        }