Class HumanPlayer

java.lang.Object
  extended by AbstractPlayer
      extended by HumanPlayer
All Implemented Interfaces:
IPlayer

public class HumanPlayer
extends AbstractPlayer


Field Summary
 
Fields inherited from class AbstractPlayer
myModel, myScore, myView, myWords
 
Constructor Summary
HumanPlayer(BoggleModel model, java.lang.String name)
           
 
Method Summary
 void 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
getScore, initialize, setView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HumanPlayer

public HumanPlayer(BoggleModel model,
                   java.lang.String name)
Method Detail

add

public void 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

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