|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectassignment2.AbstractPlayer
assignment2.HumanPlayer
public class HumanPlayer
Boggle player that interacts with a human player. Duplicate words generate an error, words not in lexicon generate an error. The errors are shown via an associated view.
| Field Summary |
|---|
| Fields inherited from class assignment2.AbstractPlayer |
|---|
myLexicon, myScore, myScoreKeeper, myView, myWords |
| Constructor Summary | |
|---|---|
HumanPlayer(ILexicon lex,
java.lang.String name)
|
|
| Method Summary | |
|---|---|
boolean |
add(java.lang.String word)
Add word if the word is in the lexicon and isn't a duplicate. |
java.lang.String |
getName()
Returns name of this player. |
| Methods inherited from class assignment2.AbstractPlayer |
|---|
clear, getScore, initialize, iterator, setView, wordCount |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HumanPlayer(ILexicon lex,
java.lang.String name)
| Method Detail |
|---|
public boolean add(java.lang.String word)
add in interface IPlayeradd in class AbstractPlayerword - is the word added to this player
public java.lang.String getName()
getName in interface IPlayergetName in class AbstractPlayer
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||