mirror of
				https://github.com/fooflington/wordsearch.git
				synced 2025-11-04 14:29:03 +00:00 
			
		
		
		
	Twiddles
This commit is contained in:
		
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							@@ -17,7 +17,7 @@ OBJS = ${SRCS:.java=.class}
 | 
			
		||||
all: build wordsearch.jar
 | 
			
		||||
 | 
			
		||||
run: all
 | 
			
		||||
	$(JAVA) uk.org.mafoo.wordsearch.GridFactory 10 10
 | 
			
		||||
	$(JAVA) uk.org.mafoo.wordsearch.GridFactory 15 15
 | 
			
		||||
 | 
			
		||||
.java.class:
 | 
			
		||||
	$(JAVAC) $(JFLAGS) $<
 | 
			
		||||
 
 | 
			
		||||
@@ -155,7 +155,7 @@ public class GridFactory {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	public static char[][] makeGrid(List<String> words, int height, int width) {
 | 
			
		||||
		return makeGrid(words, height, width, Modes.NORMAL);
 | 
			
		||||
		return makeGrid(words, height, width, Modes.CROSSWORD);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	public static char[][] makeGrid(List<String> words, int height, int width, Modes mode) {
 | 
			
		||||
@@ -205,6 +205,7 @@ public class GridFactory {
 | 
			
		||||
		// System.out.println("[" + word + "] Placing @ " + x + "," + y + " going " + direction);
 | 
			
		||||
		char[][] tempgrid = clone2d(grid);
 | 
			
		||||
		for( char c : word.toUpperCase().toCharArray() ) {
 | 
			
		||||
 | 
			
		||||
			if(!Character.isLetter(c)) continue;
 | 
			
		||||
			if(grid[y][x] != Character.UNASSIGNED) {
 | 
			
		||||
				if (grid[y][x] != c) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user