Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.0k 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 Reply

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...