|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectnet.bluebones.boggle.Turn
public class Turn
Represents the result of a round for a given player.
| Constructor Summary | |
|---|---|
Turn(NamedClient namedClient,
String[] words)
Initialises a turn with the specified values. |
|
| Method Summary | |
|---|---|
void |
addDuplicateWord(String word)
Adds a word to the duplicate words held by this Turn. |
void |
addMisspeltWord(String word)
Adds a word to the misspelt words held by this Turn. |
void |
addNotOnBoardWord(String word)
Add the specified word to the list of words that were not on the board. |
void |
addTooShortWord(String word)
Add the specified word to the list of words that were too short to add. |
void |
addUniqueWord(String word)
Adds a unique word to the unique words held by this Turn. |
Set |
getDuplicateWords()
Gets the duplicate words in this Turn. |
Set |
getMisspeltWords()
Gets the misspelt words in this Turn. |
Set |
getNotOnBoardWords()
Gets the not on board words in this Turn. |
Set |
getTooShortWords()
Gets the too short words in this Turn. |
Set |
getUniqueWords()
Gets the unique words in this Turn. |
String[] |
getWords()
Gets all the words that form part of this Turn. |
boolean |
hasBeenMarked()
Whether this Turn has been marked yet (by Round). |
NamedClient |
namedClient()
Gets the NamedClient whose turn this is. |
int |
score()
Gets the score that this Turn is worth. |
void |
setMarked(boolean value)
Sets whether this turn has been marked or not. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Turn(NamedClient namedClient,
String[] words)
namedClient - NamedClient whose turn this is.words - Words that this client came up with this turn.| Method Detail |
|---|
public int score()
throws IllegalStateException
IllegalStateException - If this method is called before the Turn
has been marked (by Round).Roundpublic boolean hasBeenMarked()
Roundpublic void setMarked(boolean value)
value - boolean to set whether marked (true) or not (false).public Set getUniqueWords()
IllegalStateException - If this method is called before the Turn
has been marked (by Round).Roundpublic Set getDuplicateWords()
IllegalStateException - If this method is called before the Turn
has been marked (by Round).Roundpublic Set getMisspeltWords()
IllegalStateException - If this method is called before the Turn
has been marked (by Round).Roundpublic Set getTooShortWords()
IllegalStateException - If this method is called before the Turn
has been marked (by Round).Roundpublic Set getNotOnBoardWords()
IllegalStateException - If this method is called before the Turn
has been marked (by Round).Roundpublic void addUniqueWord(String word)
word - Word to add.public void addDuplicateWord(String word)
word - Word to add.public void addMisspeltWord(String word)
word - Word to add.public void addNotOnBoardWord(String word)
word - String word to add.public void addTooShortWord(String word)
word - String word to add.public String[] getWords()
public NamedClient namedClient()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||