import java.awt.Point; enum Orientation{ HORIZONTAL, VERTICAL, DIAGONAL, UNKNOWN }; /** * Written by: Barry Wittman * Submitted on: 10/1/07 * * Purpose: Word is a utility class used in the Puzzle and PuzzleSolver classes to store a word, its starting point, and orientation on a * Word Hunt board in the process of solving Word Hunt games. * * @author Barry Wittman */ public class Word { private String data; private Point start; private Orientation orientation; public Word( String data, Point start, Orientation orientation ) { this.data = data; this.start = start; this.orientation = orientation; } public Word( String data ) { this( data, null, Orientation.UNKNOWN ); } public String getData() { return data; } public void setData(String data) { this.data = data; } public Point getStart() { return start; } public void setStart(Point start) { this.start = start; } public Orientation getOrientation() { return orientation; } public void setOrientation( Orientation orientation ) { this.orientation = orientation; } public String toString() { return data; } }