Finish introduction
+15
@@ -35,3 +35,18 @@ flowchart TD
|
|||||||
solve --> print3
|
solve --> print3
|
||||||
print3 --> stop
|
print3 --> stop
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The program can be split into multiple parts. The above diagram showing the
|
||||||
|
general flow, but putting the `solve puzzle` part into a black box. This
|
||||||
|
subroutine contains the actual algorithm, and will be analysed later. The other
|
||||||
|
functions a more trivial, but nonetheless necessary. We need:
|
||||||
|
|
||||||
|
- A routine that prints text on the terminal
|
||||||
|
- We need a routine, that can grab the parameters a user passed to the command
|
||||||
|
line, and read the command line parameters. since ITS does not have a built-in
|
||||||
|
mechanism for this, we need to write our own.
|
||||||
|
- We need to be able to open the file, that was passed to us, and open it, as
|
||||||
|
well as reading the data from it.
|
||||||
|
- We need a data structure to store the playing field in.
|
||||||
|
- We need a routine, that clears the screen and shows the current state of the
|
||||||
|
playing grid on the screen.
|
||||||
|
|||||||
Reference in New Issue
Block a user