Coding for a Wrod Search game.
Hey guys, I got a crazy one here, and I'm really lost.
Basically, what I have to do is read in a .txt file that looks like this:
10 10
WVERTICALL
ROOAFFLSAB
ACRILIATOA
NDODKONWDC
DRKESOODDK
OEEPZEGLIW
MSIIHOAERA
ALRKRRIRER
KODIDEDRCD
HELWSLEUTH
10
WEEK
FIND
RANDOM
SLEUTH
BACKWARD
VERTICAL
DIAGONAL
WIKIPEDIA
HORIZONTAL
WORDSEARCH
The first line dictates the number of rows and columns the word search must be (in this case 10x10), followed by the word search itself. The next 10 says how many hidden words there are in the search, and then it is followed by each word that must be found.
The output result that I must print out has to say "(whatever word) was found at (coordinate x,y)", the coordinate being where the first letter of the word was found.
So, I know this has to do with arrays, and I'll have to search the array for the specified items, but I have no idea how to do that at all. Especially since words can be found horizontal, vertical, diagonal, etc.
Thanks.
Re: Coding for a Wrod Search game.
Re: Coding for a Wrod Search game.
That's my roommate, we figured I would use this site and he'd use that one, for better results.