Another Programming Enigma...
Posted: Sun Feb 04, 2007 7:12 pm
Hi all,
Come up against another 'wall' in my quest to get a puzzle game together. I've chopped and changed the idea for the gameplay, and I still may not be 100% happy with how it is at the moment. Anyway, let me explain what's going on. Take a look at the piccy, here.
The current aim of the game is to swap the letters around to make words of 2 - 5 letters length in a 'crossword' form. So each word must be connected to another by at least one letter. As said earlier, I'm considring changing this, but at the moment, I'm sticking with this.
What I've come up against, is a similar problem to what I had before (finding words within words). Words can be formed anywhere within the grid, but I'm not sure how to implement the 'word checking' algorithm. Essentially, how to 'check' that the player has made a valid word following a letter 'swap'. I'll also need to take into account whether the word is attached to another, which I think will also be pretty difficult!
Techy details: Letters are stored in a dim'd string array of 2 dimensions (4, 4) (25 elements). I'm reading in my dictionary as before to an array.
I'm working on it most of the evening now, so may suss it out, but if anyone does have any tips, they're always appreciated!
Cheers!

Come up against another 'wall' in my quest to get a puzzle game together. I've chopped and changed the idea for the gameplay, and I still may not be 100% happy with how it is at the moment. Anyway, let me explain what's going on. Take a look at the piccy, here.
The current aim of the game is to swap the letters around to make words of 2 - 5 letters length in a 'crossword' form. So each word must be connected to another by at least one letter. As said earlier, I'm considring changing this, but at the moment, I'm sticking with this.

What I've come up against, is a similar problem to what I had before (finding words within words). Words can be formed anywhere within the grid, but I'm not sure how to implement the 'word checking' algorithm. Essentially, how to 'check' that the player has made a valid word following a letter 'swap'. I'll also need to take into account whether the word is attached to another, which I think will also be pretty difficult!

Techy details: Letters are stored in a dim'd string array of 2 dimensions (4, 4) (25 elements). I'm reading in my dictionary as before to an array.
I'm working on it most of the evening now, so may suss it out, but if anyone does have any tips, they're always appreciated!
Cheers!
