As we have read, it all starts with a window. And since we are running compiled code here, it's created in the main function.
Having only this, the GUI would look rather boring, but it's not bad
for just a few lines of code, isn't it? It looks a bit awkward but we
will see later that this is needed to make the field resizeable. If
this were all the program, we would need a line
to clean up everything and finish. With that, our program would like shown in Fig. 9.
Figure 9: The hsMines window, initial state.