Skip to content

Commit 0297e7f

Browse files
Regenerate README for minesweeper to remove borders
exercism/problem-specifications#1602
1 parent d73f714 commit 0297e7f

File tree

1 file changed

+29
-19
lines changed

1 file changed

+29
-19
lines changed

exercises/minesweeper/README.md

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,40 @@
11
# Minesweeper
22

3-
Add the numbers to a minesweeper board.
3+
Add the mine counts to a completed Minesweeper board.
44

55
Minesweeper is a popular game where the user has to find the mines using
66
numeric hints that indicate how many mines are directly adjacent
77
(horizontally, vertically, diagonally) to a square.
88

99
In this exercise you have to create some code that counts the number of
10-
mines adjacent to a square and transforms boards like this (where `*`
11-
indicates a mine):
12-
13-
+-----+
14-
| * * |
15-
| * |
16-
| * |
17-
| |
18-
+-----+
19-
20-
into this:
21-
22-
+-----+
23-
|1*3*1|
24-
|13*31|
25-
| 2*2 |
26-
| 111 |
27-
+-----+
10+
mines adjacent to a given empty square and replaces that square with the
11+
count.
12+
13+
The board is a rectangle composed of blank space (' ') characters. A mine
14+
is represented by an asterisk ('\*') character.
15+
16+
If a given space has no adjacent mines at all, leave that square blank.
17+
18+
## Examples
19+
20+
For example you may receive a 5 x 4 board like this (empty spaces are
21+
represented here with the '·' character for display on screen):
22+
23+
```
24+
·*·*·
25+
··*··
26+
··*··
27+
·····
28+
```
29+
30+
And your code will transform it into this:
31+
32+
```
33+
1*3*1
34+
13*31
35+
·2*2·
36+
·111·
37+
```
2838

2939
## Rust Installation
3040

0 commit comments

Comments
 (0)