Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

24 - minesweeper #60

Closed
Tracked by #40
ValdineiJunior opened this issue Jul 8, 2023 · 0 comments
Closed
Tracked by #40

24 - minesweeper #60

ValdineiJunior opened this issue Jul 8, 2023 · 0 comments

Comments

@ValdineiJunior
Copy link
Owner

ValdineiJunior commented Jul 8, 2023

minesweeper

In the popular Minesweeper game you have a board with some mines and those cells that don't contain a mine have a number in it that indicates the total number of mines in the neighboring cells. Starting off with some arrangement of mines we want to create a Minesweeper game setup.

Example

For

matrix = [[true, false, false],
          [false, true, false],
          [false, false, false]]

the output should be

solution(matrix) = [[1, 2, 1],
                    [2, 1, 1],
                    [1, 1, 1]]

Check out the image below for better understanding:

click here to see my solution in replit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant