Class BadWordFinder

java.lang.Object
  extended by BadWordFinder
All Implemented Interfaces:
IWordOnBoardFinder

public class BadWordFinder
extends java.lang.Object
implements IWordOnBoardFinder

Cannot find any words on a board. Useful for debugging a game before a good implementation is written.

Author:
Owen Astrachan

Constructor Summary
BadWordFinder()
           
 
Method Summary
 java.util.List<BoardCell> cellsForWord(BoggleBoard board, java.lang.String word)
          Return a list of cells on the given board such that the i-th element of the list correponds to the i-th character of the string as found on the board.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BadWordFinder

public BadWordFinder()
Method Detail

cellsForWord

public java.util.List<BoardCell> cellsForWord(BoggleBoard board,
                                              java.lang.String word)
Description copied from interface: IWordOnBoardFinder
Return a list of cells on the given board such that the i-th element of the list correponds to the i-th character of the string as found on the board. Returns null if the word cannot be found on the board.

Specified by:
cellsForWord in interface IWordOnBoardFinder
Parameters:
board - is searched for the given word
word - is being searched for on the board
Returns:
list of cells on the supplied board that correspond to the word, or null if the word cannot be found on the board