|
|||||||||
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 model and a view. Players add words, e.g., human players might enter a string of text and computer players might find words on an associated model's board.
Method Summary | |
---|---|
void |
add(java.lang.String word)
Add a word for the player. |
java.lang.String |
getName()
Return the name of a player. |
int |
getScore()
Get the score for this player, see BoggleModel
for how scores are calculated. |
void |
initialize(BoggleModel model)
Initialize a player with a model, the model will serve this player for potentially 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. |
Method Detail |
---|
void initialize(BoggleModel model)
model
- is the BoggleModel for this playervoid setView(IPlayerView view)
view
- int getScore()
BoggleModel
for how scores are calculated.
void add(java.lang.String word)
word
- java.lang.String getName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |