I have made a textual minesweeper game (here you can find the program). I want to initialize some data by the help of a file. The file should be readable for humans and easy to modify with a simple text editor. The file should look for example like this and it should allow comments:
# columns and rows size:10 # describes how the field is selected # 1 - <o x x> (for example e 5 7 which means explore field with coordinates 5 7) # 2 - easy entering format format: 1 # possibility that a field is bombed (1 / possibility) possibility: 8
In which part of the program and in which manner should I read such a file? What is the most efficient way to read such a file? Thank you for all answers!