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.


Variable Index

 o observers
Set of observers that will be notified of board changes, typically the Player objects.

Constructor Index

 o ServerBoard(BoardShape)
Creates a new ServerBoard

Method Index

 o addObserver(Observer)
Adds an observer to the set of observers for this board.
 o countObservers()
Returns the number of observers observing this board.
 o deleteObserver(Observer)
Deletes an observer from the set of observers for this board.
 o deleteObservers()
Clears the observerlist so that this board no longer has any observers.
 o notifyObservers(LinkFrame)
Notifies all observers that this board has changed, giving them the frame containing the changes.
 o putWord(WordPositioner)
Puts the word on the board
 o 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.

Variables

 o observers
 protected Observable observers
Set of observers that will be notified of board changes, typically the Player objects.

Constructors

 o ServerBoard
 public ServerBoard(BoardShape shape)
Creates a new ServerBoard

Methods

 o 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
 o 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
 o addObserver
 public void addObserver(Observer obs)
Adds an observer to the set of observers for this board.

Parameters:
obs - an observer to be added.
 o deleteObserver
 public void deleteObserver(Observer obs)
Deletes an observer from the set of observers for this board.

Parameters:
obs - the observer to be deleted
 o deleteObservers
 public void deleteObservers()
Clears the observerlist so that this board no longer has any observers.

 o countObservers
 public int countObservers()
Returns the number of observers observing this board.

Returns:
the number of observers observing this board.
 o 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