Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.8k views
in Technique[技术] by (71.8m points)

algorithm - understanding the minesweeper programming p.roblem

I am trying to understand the minesweeper problem:
Problem statement:
Have you ever played Minesweeper? This cute little game comes with a certain operating system whose name we can’t remember. The goal of the game is to ?nd where all the mines are located within a M ×N ?eld. The game shows a number in a square which tells you how many mines there are adjacent to that square. Each square has at most eight adjacent squares. The 4×4 ?eld on the left contains two mines, each represented by a “ * ” character. If we represent the same ?eld by the hint numbers described above, we end up with the ?eld on the right:
The test case
here is the test case

I am not understanding the problem. just explain me the problem so that I could solve it on my own. PLEASE DO NO EXPLAIN THE SOLUTION.

( I have already seen this problem and many others like this but they are not talking about the core programming problems , they are game projects. )

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

In theory minesweeper can be made as grid of objects. When player use any object then (in classical minesweeper) surrounding objects checks THEIR surrounding objects and count how many are marked as mine.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...