Translations:FP Homework 1/11/en

From Marek Běhálek Wiki
Jump to navigation Jump to search

Implement the function minesweeper which has 1 argument of the type list of strings. The strings represent play field row by row from top to bottom ('*' - mine, ' ' - empty square). Print play field in a way where mines will be represented by '*' and on each square not containing a mine will be a number - count of all mines directly adjacent to this square (it can be adjacent vertically, horizontally or diagonally).