modes update

This commit is contained in:
Matthew Slowe 2017-10-15 16:20:42 +01:00
parent b02ef52f65
commit d8a0ed6f5a
No known key found for this signature in database
GPG Key ID: DE311E1AC27AC583
8 changed files with 26 additions and 3 deletions

View File

@ -7,7 +7,8 @@ SRCS = uk/org/mafoo/wordsearch/GridFactory.java \
uk/org/mafoo/wordsearch/Bounds.java \
uk/org/mafoo/wordsearch/CouldNotPlaceWordException.java \
uk/org/mafoo/wordsearch/Direction.java \
uk/org/mafoo/wordsearch/DistributedRandomNumberGenerator.java
uk/org/mafoo/wordsearch/DistributedRandomNumberGenerator.java \
uk/org/mafoo/wordsearch/Modes.java
OBJS = ${SRCS:.java=.class}

BIN
src/dir.o Normal file

Binary file not shown.

BIN
src/grid.o Normal file

Binary file not shown.

BIN
src/rnd.o Normal file

Binary file not shown.

BIN
src/wordsearch Executable file

Binary file not shown.

View File

@ -161,7 +161,7 @@ public class GridFactory {
public static char[][] makeGrid(List<String> words, int height, int width, Modes mode) {
char[][] grid = new char[height][width];
bool simple = (mode == Modes.SIMPLE || mode == Modes.CROSSWORD);
boolean simple = (mode == Modes.SIMPLE || mode == Modes.CROSSWORD);
// Place words at random?
for (String word : words) {

View File

@ -3,5 +3,5 @@ package uk.org.mafoo.wordsearch;
enum Modes {
NORMAL,
SIMPLE,
CROSSWORD,
CROSSWORD;
}

View File

@ -0,0 +1,22 @@
package uk.org.mafoo.wordsearch;
import java.sql.*;
class Store {
Connection conn = null;
protected Store(String dbfile) {
try {
Class.forName("org.sqlite.JDBC");
conn = DriverManager.getConnection("jdbc:sqlite:" + dbfile);
} catch ( Exception e ) {
System.err.println( e.getClass().getName() + ": " + e.getMessage() );
System.exit(1);
}
}
protected storeInstance()
}