com.blackledge.david.game.crossword
Class CrosswordPuzzle.Puzzleword
java.lang.Object
com.blackledge.david.game.crossword.CrosswordPuzzle.Puzzleword
- All Implemented Interfaces:
- Comparable
- Enclosing class:
- CrosswordPuzzle
public static class CrosswordPuzzle.Puzzleword
- extends Object
- implements Comparable
Embodiment of an entry in a Crossword Puzzle - word, position, direction,
and clue. Has natural sorting order that matches clue numbering scheme.
- Version:
- $Revision: 1.3 $
CrosswordPuzzle.Puzzleword
public CrosswordPuzzle.Puzzleword(String word,
String clue,
boolean horizontal,
int top,
int left)
isHorizontal
public boolean isHorizontal()
getTop
public int getTop()
getLeft
public int getLeft()
getClue
public String getClue()
setClue
public void setClue(String clue)
setClueNumber
public void setClueNumber(int clueNumber)
getClueNumber
public int getClueNumber()
compareTo
public int compareTo(Object o)
- Sort in clue order, ignoring horizontal/vertical except horizontal
are listed before vertical when in the same location.
- Specified by:
compareTo
in interface Comparable
toString
public String toString()
- Presents the clue and the clue number/direction.
- Overrides:
toString
in class Object
getLength
public int getLength()