Application Kata „Minesweeper“
Write a program that creates a cheat sheet for a given minesweeper game.
Minesweeper is a game that was originally part of the Windows operating system installation. The goal of the game is to open all fields that don’t contain mines without hitting a field with a mine underneath. If a field with a mine is clicked the game is over. Each field that is opened shows a number that depicts how many mines are in the neighborhood of the field.
The program you have to write has to create a cheat sheet that shows the number of mines in the neighborhood of each field.
An input file looks like the following example:
You call the program like the following:
C:> cheatsheet field1.txt cheat1.txt
The resulting file cheat1.txt has the following content:
A further example for input and output of the program:
“I am the founder of Majer Consulting and Majer Training and an experienced software developer, trainer and consultant. I have been on the road in the SAP world since 1998, supporting numerous projects, and have developed a passion for software engineering, software testing and agile development methods such as TDD. When I am not servicing customers or holding seminars, I am speaking at conferences or writing my next book.”