becker.xtras.jotto
Class SampleHintWithAllLetters

java.lang.Object
  extended by becker.xtras.jotto.Hint
      extended by becker.xtras.jotto.SampleHintWithAllLetters
All Implemented Interfaces:
IWordPredicate

public class SampleHintWithAllLetters
extends Hint

Provide a hint consisting of words that contain all of the letters specified by the user.

Author:
Byron Weber Becker

Field Summary
 
Fields inherited from class becker.xtras.jotto.Hint
DIFFICULTY, GUESSES, LETTER, LETTERS, NONE
 
Constructor Summary
SampleHintWithAllLetters()
           
 
Method Summary
 Word[] getHintWords(int maxDesired, IHintData hintData)
          Get the words to display as the hint.
 boolean isOK(Word w)
          Override this method to specify whether or not the Word w is an acceptable answer for this hint.
 
Methods inherited from class becker.xtras.jotto.Hint
getArgumentType, getDescription, main
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampleHintWithAllLetters

public SampleHintWithAllLetters()
Method Detail

isOK

public boolean isOK(Word w)
Description copied from class: Hint
Override this method to specify whether or not the Word w is an acceptable answer for this hint.

Specified by:
isOK in interface IWordPredicate
Specified by:
isOK in class Hint
Parameters:
w - The word to test.
Returns:
true if the word should be included in the hint's answer; false otherwise.

getHintWords

public Word[] getHintWords(int maxDesired,
                           IHintData hintData)
Description copied from class: Hint
Get the words to display as the hint.

Specified by:
getHintWords in class Hint
Returns:
the words in the list of known words that satisfies the isOK method.