I'm making a minesweeper game in minecraft (never mind).
I created a code that randomly places mines, displays the number of bombs around each block, detects clear and fail of the game.
Even if the same number of mines were placed on a map of the same size, the difficulty was very different for each game, so I felt that it requires a lot of luck to clear the game quickly.
So I'm looking for an algorithm to generate numerically the overall difficulty of a randomly generated map.
I tried a method of calculating the difficulty level by scoring and summing each number (colour) of each tile (block). However, we couldn't find a score for each tile that would be able to score a reasonable difficulty score.
Since it's a command operation in Minecraft, I don't want too complex expressions or perfect results. If there is an algorithm that can be divided into about 3~5 levels by obtaining the difficulty of a randomly generated map, I would appreciate it if you could explain it to me
(redestone block is mine, and each colour represents number tile 1 2 3)