All Packages Class Hierarchy This Package Previous Next Index
Class scrobble.ServerBoard
java.lang.Object
|
+----scrobble.Board
|
+----scrobble.ServerBoard
- public class ServerBoard
- extends Board
- implements GameLinkConstants, ScrobbleConstants
[DESCRIBE ME]
herite de Board, verifie qu'un mot peut etre place sur le board, que tous les
mots formes sont dans le dico et compte les points.
-
observers
- Set of observers that will be notified of board changes, typically the
Player
objects.
-
ServerBoard(BoardShape)
- Creates a new ServerBoard
-
addObserver(Observer)
- Adds an observer to the set of observers for this board.
-
countObservers()
- Returns the number of observers observing this board.
-
deleteObserver(Observer)
- Deletes an observer from the set of observers for this board.
-
deleteObservers()
- Clears the observerlist so that this board no longer has any observers.
-
notifyObservers(LinkFrame)
- Notifies all observers that this board has changed, giving them
the frame containing the changes.
-
putWord(WordPositioner)
- Puts the word on the board
-
verifyAndCount(WordPositioner, Dico)
- Verifies that the given word can be put on the board, and checks all the resulting words can be found in the dictionary.
observers
protected Observable observers
- Set of observers that will be notified of board changes, typically the
Player
objects.
ServerBoard
public ServerBoard(BoardShape shape)
- Creates a new ServerBoard
putWord
public void putWord(WordPositioner wordp)
- Puts the word on the board
- Parameters:
- wordp - the WordPositioner containing the word and the position of the word
- Overrides:
- putWord in class Board
verifyAndCount
public int verifyAndCount(WordPositioner wordp,
Dico dico) throws IllegalPositionException, IllegalWordException
- Verifies that the given word can be put on the board, and checks all the resulting words can be found in the dictionary.
In this case, this method returns the score of the player, throws exception otherwise.
- Parameters:
- wordp - the WordPositioner to be verified.
- dico - the dictionary in which the word is to be seeked
- Returns:
- the score of the player
addObserver
public void addObserver(Observer obs)
- Adds an observer to the set of observers for this board.
- Parameters:
- obs - an observer to be added.
deleteObserver
public void deleteObserver(Observer obs)
- Deletes an observer from the set of observers for this board.
- Parameters:
- obs - the observer to be deleted
deleteObservers
public void deleteObservers()
- Clears the observerlist so that this board no longer has any observers.
countObservers
public int countObservers()
- Returns the number of observers observing this board.
- Returns:
- the number of observers observing this board.
notifyObservers
public void notifyObservers(LinkFrame frame)
- Notifies all observers that this board has changed, giving them
the frame containing the changes.
- Parameters:
- frame - the frame containing the changes
All Packages Class Hierarchy This Package Previous Next Index