java.lang.Object
test.Word
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintgetCol()The getCol function returns the column of the current position.intgetRow()The getRow function returns the row of the current position.Tile[]getTiles()The getTiles function returns the tiles array.booleanThe isVertical function returns a boolean value that indicates whether the current instance of the class is vertical or not.
-
Constructor Details
-
Word
The Word function returns the word that is formed by the tiles in a Word object.- Parameters:
tiles- Store the tiles that make up this wordrow- Set the row of the wordcol- Set the column of the first tile in a wordvertical- Determine if the word is vertical or horizontal
-
-
Method Details
-
getTiles
The getTiles function returns the tiles array.- Returns:
- An array of tiles
-
getRow
public int getRow()The getRow function returns the row of the current position.- Returns:
- The row number of first letter of word
-
getCol
public int getCol()The getCol function returns the column of the current position.- Returns:
- The column number of first letter of word
-
isVertical
public boolean isVertical()The isVertical function returns a boolean value that indicates whether the current instance of the class is vertical or not.- Returns:
- A boolean value of true or false depending on the orientation of the word
-
equals
-