|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPlayer
A Boggle player must support the methods
of this interface. Each player has an associated
view. Players add words, e.g., human players
might enter a string of text and computer players
might find words on a board passed to a computer player method.
(See IAutoPlayer
).
Method Summary | |
---|---|
boolean |
add(java.lang.String word)
Add a word for the player. |
void |
clear()
Clear state of a player, e.g., as in a new game. |
java.lang.String |
getName()
Return the name of a player. |
int |
getScore()
Get the score for this player, see BoggleScore
for how scores are calculated. |
void |
initialize(ILexicon lex)
Initialize a player with a Lexicon which could serve this player for more than one game |
void |
setView(IPlayerView view)
Specify a view for this player, the view is potentially used to show errors, highlight cubes for a word, and so on. |
int |
wordCount()
Return number of unique words added by this player. |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Method Detail |
---|
void initialize(ILexicon lex)
lex
- is the Lexicon for this playervoid setView(IPlayerView view)
view
- int getScore()
BoggleScore
for how scores are calculated.
boolean add(java.lang.String word)
word
-
java.lang.String getName()
void clear()
int wordCount()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |