public static void Main()
const int BOMB_COUNT = 10;
int[,] square = new int[WIDTH, HEIGHT];
var bombXYs = new (int X, int Y)[BOMB_COUNT];
for (int i = 0; i < BOMB_COUNT; ++i)
int x = rand.Next(0, WIDTH - 1);
int y = rand.Next(0, HEIGHT - 1);
foreach (var bombXY in bombXYs)
int xLength = Math.Min(bombXY.X + 2, WIDTH);
int yLength = Math.Min(bombXY.Y + 2, HEIGHT);
int x = Math.Max(bombXY.X - 1, 0);
int y = Math.Max(bombXY.Y - 1, 0);
if (square[x, y] != BOMB)
square[x, y] = square[x, y] + 1;
for (int x = 0; x < WIDTH; ++x)
for (int y = 0; y < HEIGHT; ++y)
Console.Write($"{square[x, y]} ");