mirror of
				https://github.com/fooflington/wordsearch.git
				synced 2025-11-04 06:19:03 +00:00 
			
		
		
		
	modes update
This commit is contained in:
		
							
								
								
									
										3
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								Makefile
									
									
									
									
									
								
							@@ -7,7 +7,8 @@ SRCS = uk/org/mafoo/wordsearch/GridFactory.java \
 | 
				
			|||||||
	uk/org/mafoo/wordsearch/Bounds.java \
 | 
						uk/org/mafoo/wordsearch/Bounds.java \
 | 
				
			||||||
	uk/org/mafoo/wordsearch/CouldNotPlaceWordException.java \
 | 
						uk/org/mafoo/wordsearch/CouldNotPlaceWordException.java \
 | 
				
			||||||
	uk/org/mafoo/wordsearch/Direction.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}
 | 
					OBJS = ${SRCS:.java=.class}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										
											BIN
										
									
								
								src/grid.o
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/grid.o
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								src/wordsearch
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/wordsearch
									
									
									
									
									
										Executable file
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -161,7 +161,7 @@ public class GridFactory {
 | 
				
			|||||||
	public static char[][] makeGrid(List<String> words, int height, int width, Modes mode) {
 | 
						public static char[][] makeGrid(List<String> words, int height, int width, Modes mode) {
 | 
				
			||||||
		char[][] grid = new char[height][width];
 | 
							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?
 | 
							// Place words at random?
 | 
				
			||||||
		for (String word : words) {
 | 
							for (String word : words) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,5 +3,5 @@ package uk.org.mafoo.wordsearch;
 | 
				
			|||||||
enum Modes {
 | 
					enum Modes {
 | 
				
			||||||
	NORMAL,
 | 
						NORMAL,
 | 
				
			||||||
	SIMPLE,
 | 
						SIMPLE,
 | 
				
			||||||
	CROSSWORD,
 | 
						CROSSWORD;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
							
								
								
									
										22
									
								
								uk/org/mafoo/wordsearch/Store.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								uk/org/mafoo/wordsearch/Store.java
									
									
									
									
									
										Normal 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()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user