First published at 14:00 UTC on July 28th, 2019.
Guardian Crossword helper.
I was at a local hospital recently, and got bored, waiting... I got a copy of the Guardian (they didn't have the Telegraph...) and I looked at the Crossword. It's an odd one where they supply numbers for the lette…
MORE
Guardian Crossword helper.
I was at a local hospital recently, and got bored, waiting... I got a copy of the Guardian (they didn't have the Telegraph...) and I looked at the Crossword. It's an odd one where they supply numbers for the letters, and give you a couple of letters and their numbers to start off.
It's a tricky one. How do you generate a grid? Nobody in their right mind would (or should...) ever consider Xword01, Xword02, etc, when you consider that this particular Crossword has a grid 13 columns across and 15 rows down. That's 195 boxes! That would be Xword001 to Xword195!!! The code would be a nightmare!
So you design it with loops - that's the simplest way to do it.
Once you have the grid, it's blank, so you need a mechanism to allow you to specify the black squares.
I have also added some buttons, to Save what you have to a file, and one to Load an existing file.
I coded the grid to be textboxes, as you will be putting a value into the grid, a square at a time.
So you have defined the grid, and you then have to put all the numbers in, and also add the examples that are given to you.
What you then have is your starting point.
If you press Match Numbers, the system will then go through the grid, finding all numbers that match the starting examples, and update them.
This is where you come in. At this point I would advise you to save, as you might need to go back (Clear and Load the last saved file)
If you look at the grid and think that a 3 might be a T, then you put that in the lower box, and press Match Numbers again, and it will update all number 3 in the main grid to show a T.
LESS