Class HumanPlayer

java.lang.Object
  extended by AbstractPlayer
      extended by HumanPlayer
All Implemented Interfaces:
IPlayer, java.lang.Iterable<java.lang.String>

public class HumanPlayer
extends AbstractPlayer


Field Summary
 
Fields inherited from class 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 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

HumanPlayer

public HumanPlayer(ILexicon lex,
                   java.lang.String name)
Method Detail

add

public boolean add(java.lang.String word)
Add word if the word is in the lexicon and isn't a duplicate. Update score appropriately via call to AbstractPlayer (super). Show word found on the associated View of this player.

Specified by:
add in interface IPlayer
Overrides:
add in class AbstractPlayer
Parameters:
word - is the word added to this player
Returns:
TODO

getName

public java.lang.String getName()
Returns name of this player.

Specified by:
getName in interface IPlayer
Specified by:
getName in class AbstractPlayer
Returns:
name of this human player