README.md (1143B) - raw
1 # Minesweeper 2 3 Welcome to Minesweeper on Exercism's Perl 5 Track. 4 If you need help running the tests or submitting your code, check out `HELP.md`. 5 6 ## Instructions 7 8 Add the mine counts to a completed Minesweeper board. 9 10 Minesweeper is a popular game where the user has to find the mines using 11 numeric hints that indicate how many mines are directly adjacent 12 (horizontally, vertically, diagonally) to a square. 13 14 In this exercise you have to create some code that counts the number of 15 mines adjacent to a given empty square and replaces that square with the 16 count. 17 18 The board is a rectangle composed of blank space (' ') characters. A mine 19 is represented by an asterisk ('\*') character. 20 21 If a given space has no adjacent mines at all, leave that square blank. 22 23 ## Examples 24 25 For example you may receive a 5 x 4 board like this (empty spaces are 26 represented here with the '·' character for display on screen): 27 28 ``` 29 ·*·*· 30 ··*·· 31 ··*·· 32 ····· 33 ``` 34 35 And your code will transform it into this: 36 37 ``` 38 1*3*1 39 13*31 40 ·2*2· 41 ·111· 42 ``` 43 44 ## Source 45 46 ### Created by 47 48 - @autark 49 50 ### Contributed to by 51 52 - @bistik 53 - @kytrinyx 54 - @m-dango 55 - @rfilipo