diff --git a/exercises/minesweeper/README.md b/exercises/minesweeper/README.md index 6f91ac925..ad4b4fb92 100644 --- a/exercises/minesweeper/README.md +++ b/exercises/minesweeper/README.md @@ -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 diff --git a/exercises/robot-name/README.md b/exercises/robot-name/README.md index 080c0070a..8702c7e40 100644 --- a/exercises/robot-name/README.md +++ b/exercises/robot-name/README.md @@ -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