Load Problem from text file
Text Format
Must be able to parse a text file and load the given problem from a text file
Example text file
... ... .1.
7.9 ..3 .68
... 5.8 .92
1.. 3.. .7.
5.. 984 ..3
.8. ..7 ..5
94. 7.5 ...
27. 8.. 4.9
.1. ... ...
which corresponds to the following sudoku puzzle
Parsing Features
- Must be able to validate the text file and handle any invalid data
- Must be able to handle empty lines and spaces used for prettifying the text file, in short they should be ignored, yet not made mandatory
- The empty values could be either
.or<space>
Software arch
- The parsing should be handled by a different package
- The fetching package should provide the parsing package with the string
- For Text File Parsing, this means, :
- it should have a text fetching package that will fetch the text from a text file
- a parsing package that converts the text to Board instance
- Later other Fetching packages could be implemented, which could provide the text to the parsing package. For e.g. (image reader)
