generateWordSearchProblem()
• makeGrid()
o instantiate an array of a given size
o fill it with random chars
• placeWords()
o read in each line
o parse it to obtain the starting row, starting col, direction, and word
o place the word
• printGrid()
public class WordSearch {
Scanner scan;
char [][] grid;
public WordSearch(String filename){
}
public void generateWordSearchProblem(){
makeGrid();
placeWords();
printGrid();
}
public void makeGrid(){
}
public void placeWords(){
}
public void printGrid(){
}
}
the Sample output would look like this
For instance:
10 15
0 0 S HELLO
5 9 W GOODBYE
3 2 E HELP
would produce this grid:
Huhksdoval
Ethlrwayrz
Lttxkkwlcu
LsHELPpgyg
Owylzoigvi
tqhEYBDOOG
kcqjrlalgj
qbeqhnhjeh
niqzjkyyir
vtfdefbhjt
Edited by Alyn, 19 October 2011 - 02:29 AM.
added code tag


Sign In
Create Account

Back to top









