Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 29 additions & 19 deletions exercises/minesweeper/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,40 @@
# Minesweeper

Add the numbers to a minesweeper board.
Add the mine counts to a completed Minesweeper board.

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

In this exercise you have to create some code that counts the number of
mines adjacent to a square and transforms boards like this (where `*`
indicates a mine):

+-----+
| * * |
| * |
| * |
| |
+-----+

into this:

+-----+
|1*3*1|
|13*31|
| 2*2 |
| 111 |
+-----+
mines adjacent to a given empty square and replaces that square with the
count.

The board is a rectangle composed of blank space (' ') characters. A mine
is represented by an asterisk ('\*') character.

If a given space has no adjacent mines at all, leave that square blank.

## Examples

For example you may receive a 5 x 4 board like this (empty spaces are
represented here with the '·' character for display on screen):

```
·*·*·
··*··
··*··
·····
```

And your code will transform it into this:

```
1*3*1
13*31
·2*2·
·111·
```

## Rust Installation

Expand Down
8 changes: 4 additions & 4 deletions exercises/robot-name/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

Manage robot factory settings.

When robots come off the factory floor, they have no name.
When a robot comes off the factory floor, it has no name.

The first time you boot them up, a random name is generated in the format
The first time you turn on a robot, a random name is generated in the format
of two uppercase letters followed by three digits, such as RX837 or BC811.

Every once in a while we need to reset a robot to its factory settings,
which means that their name gets wiped. The next time you ask, it will
which means that its name gets wiped. The next time you ask, that robot will
respond with a new random name.

The names must be random: they should not follow a predictable sequence.
Random names means a risk of collisions. Your solution must ensure that
Using random names means a risk of collisions. Your solution must ensure that
every existing robot has a unique name.

## Rust Installation
Expand Down