Minesweeper Board Generator

Minesweeperuniqueuniformminepositions/eightneighborcounts,−1mine,not safe-firstclick/puzzleuniqueness guarantee. Bounded offline explicitly declared convention;not personalidentity/traitinference,prediction,secure randomness or guaranteedgameresult.

Description

A Minesweeper board records mine locations and adjacent-mine counts.

A Minesweeper board records mine locations and adjacent-mine counts.1

A generated board can include a mined first click and is not checked for a unique deduction-only solution.

When to use Minesweeper Board Generator

Use this tool to apply the stated minesweeper board generator operation with an explicit input and unit basis.

How to use Minesweeper Board Generator and how it works

  1. Establish the text or game convention described above.
  2. Enter seed, rows, columns, mineCount and run the tool.
  3. Read result.cells using the output meanings below.
  4. If input is rejected, correct the stated type, range, ordering or alignment issue and rerun; review successful results under the declared convention.
Input fieldMeaningValue typeRequirement
seedNonblank reproducibility string, at most 256 characters; required even with a supplied random source.stringrequired; further conditions in the algorithm
rowsRows, on the basis specified in the algorithm.numberrequired; finite; integer from 1 to 32; further conditions in the algorithm
columnsColumns, on the basis specified in the algorithm.numberrequired; finite; integer from 1 to 32; further conditions in the algorithm
mineCountMine count, on the basis specified in the algorithm.numberRequired integer 0–min(64, rows × columns).

Require rows and columns 1–32 and integer mines 0–min(64,cells). Sample distinct cell indices; mark mines −1 and count neighboring mines in the surrounding eight cells. A nonblank seed of at most 256 characters selects the existing seeded generator unless execution context supplies random. One source advances through the request; supplied samples must be finite in [0,1). These draws are not cryptographically secure.

The default source hashes the seed’s UTF-16 units into an integer state and advances a deterministic arithmetic generator for each sample. A supplied execution-context random source takes precedence; it must return finite values in [0,1). The required seed still must be nonblank and at most 256 characters. These draws are reproducible entertainment or sampling, without cryptographic unpredictability.2

cell = mine ? −1 : adjacent mine count

Apply the declared units, ordering and branch conditions.

Output fieldMeaningValue type
resultObject containing the declared output fields.object
result.cellsRow-major integer board: −1 for mines, otherwise adjacent mine counts 0–8.array
json
{
  "input": {
    "seed": "batch51",
    "rows": 2,
    "columns": 2,
    "mineCount": 1
  },
  "output": {
    "result": {
      "cells": [
        [
          1,
          -1
        ],
        [
          1,
          1
        ]
      ]
    }
  }
}

Limitations and assumptions

The output applies the declared operation to the values you supply. Establish the measurement basis, units, coefficients and any caller-selected rules before interpreting it. The tool does not independently collect or verify observations or decide whether a model or reference applies.

Supply explicit required fields with the documented types and dense aligned arrays. Unknown fields, wrong types and nonfinite numbers are rejected. Branch-specific constraints are explained above. A successful false boolean, negative signed difference, empty slice or unresolved tie is distinct from an input error. Very large inputs or outputs may be rejected by shared resource limits.

Alternative or Complementary methods

For a related operation, use Word Search Puzzle Generator. A simple word-search grid can place one word left-to-right at the start of each row.

For a related operation, use Pig Latin Converter. Pig Latin can be implemented under a declared written-vowel convention.

References

  1. Minesweeper Board Generator — tool.io

  2. Existing seeded random generator — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies