bill.apps.wordfind
Class WordFindLetter
java.lang.Object
|
+--bill.apps.wordutil.Letter
|
+--bill.apps.wordfind.WordFindLetter
- public class WordFindLetter
- extends Letter
This class is used to contain information about a letter that is available
to be a part of a word. This class is specific to the WordFind application.
Method Summary |
CoordinateXY |
getNextLetter(int height,
int width)
Gets the next candidate letter in a word. |
int |
getX()
Indicates the X position of the cube in the playing grid (0 based). |
int |
getY()
Indicates the Y position of the cube in the playing grid (0 based). |
WordFindLetter
public WordFindLetter(WordFind search,
char character,
int x,
int y)
- The creator. Sets class variables to and specified values.
- Parameters:
search
- The WordFind clas that contains the letters.character
- The character represented by this letter
getX
public int getX()
- Indicates the X position of the cube in the playing grid (0 based).
- Returns:
- The X position (i.e. the column)
getY
public int getY()
- Indicates the Y position of the cube in the playing grid (0 based).
- Returns:
- The Y position (i.e. the row)
getNextLetter
public CoordinateXY getNextLetter(int height,
int width)
- Gets the next candidate letter in a word. This is done by checking
for the next unused letter in the letters adjacent to this one.
- Returns:
- The letter that was found, or
null
if one could
not be found.