mirror of
https://github.com/fooflington/wordsearch.git
synced 2025-01-22 09:19:55 +00:00
Merge branch 'master' into more-modes
This commit is contained in:
commit
f7b05f3183
@ -17,5 +17,10 @@ Once built, you need to make a "war" file to deploy to your J2EE container (test
|
|||||||
```
|
```
|
||||||
$ cd war && jar cfv ../wordsearch.war .
|
$ cd war && jar cfv ../wordsearch.war .
|
||||||
```
|
```
|
||||||
|
|
||||||
Then deploy your war file :-)
|
Then deploy your war file :-)
|
||||||
|
|
||||||
|
Alternatively you can test-run the engine...
|
||||||
|
```
|
||||||
|
$ make run <wordlist.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ public class GridFactory {
|
|||||||
while ((s = in.readLine()) != null && s.length() != 0) {
|
while ((s = in.readLine()) != null && s.length() != 0) {
|
||||||
words.add(s);
|
words.add(s);
|
||||||
}
|
}
|
||||||
char[][] g = makeGrid(words, Integer.parseInt(args[0]), Integer.parseInt(args[1]));
|
char[][] g = makeGrid(words, Integer.parseInt(args[0]), Integer.parseInt(args[1]), false, false);
|
||||||
dump2d(g);
|
dump2d(g);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,10 +155,10 @@ public class GridFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static char[][] makeGrid(List<String> words, int height, int width) {
|
public static char[][] makeGrid(List<String> words, int height, int width) {
|
||||||
return makeGrid(words, height, width, Modes.CROSSWORD);
|
return makeGrid(words, height, width, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static char[][] makeGrid(List<String> words, int height, int width, Modes mode) {
|
public static char[][] makeGrid(List<String> words, int height, int width, boolean simple, boolean fill) {
|
||||||
char[][] grid = new char[height][width];
|
char[][] grid = new char[height][width];
|
||||||
|
|
||||||
// Place words at random?
|
// Place words at random?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user