All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class scrobble.ServerScrobblePlayer

java.lang.Object
   |
   +----game.Player
           |
           +----scrobble.ScrobblePlayer
                   |
                   +----scrobble.ServerScrobblePlayer

public class ServerScrobblePlayer
extends ScrobblePlayer
The ServerScrobblePlayer class adds the server functionnalities to ScrobblePlayer for the jags game, such as removing the letters of ServerPlayer when a word is played.


Constructor Index

 o ServerScrobblePlayer()
Creates a new ServerScrobblePlayer
 o ServerScrobblePlayer(String)
creates a new ServerScrobblePlayer with his name.
 o ServerScrobblePlayer(String, GameLinkFilter)
Creates a new ServerScrobblePlayer with his name and a gamelink.

Method Index

 o addLetter(Letter)
Adds a Letter in the letters of Player and increases the number of Letters of the Player by one.
 o addLetters(Vector)
adds a vector of Letters in the letters of Player, increases the number of Letters of the Player by the number of Letters added and send a frame to indicate that playletters has changed.
 o main(String[])
 o removeLetters()
Removes all Letters from the Player's Letters and sets the number of Letters of Player to zero.
 o removeLetters(Vector)
Removes the Letters contained in vector of the Player's Letters
 o sendChangement(Vector)
Notify the ClientPlayer that his letters has changed and sends the new letters.

Constructors

 o ServerScrobblePlayer
 public ServerScrobblePlayer()
Creates a new ServerScrobblePlayer

 o ServerScrobblePlayer
 public ServerScrobblePlayer(String name)
creates a new ServerScrobblePlayer with his name.

Parameters:
name - the ServerScrobblePlayer's name.
 o ServerScrobblePlayer
 public ServerScrobblePlayer(String name,
                             GameLinkFilter gamelink)
Creates a new ServerScrobblePlayer with his name and a gamelink.

Parameters:
name - the ServerScrobblePlayer's name.
gamelink - the ServerScrobblePlayer's gamelink.

Methods

 o addLetter
 public void addLetter(Letter letter)
Adds a Letter in the letters of Player and increases the number of Letters of the Player by one.

Parameters:
vector - the Letter to be added.
 o sendChangement
 public void sendChangement(Vector letters)
Notify the ClientPlayer that his letters has changed and sends the new letters. Notify the others Players that the number of letters of this Player has changed

Parameters:
letters - the new letters of the Player.
 o addLetters
 public void addLetters(Vector vector)
adds a vector of Letters in the letters of Player, increases the number of Letters of the Player by the number of Letters added and send a frame to indicate that playletters has changed.

Parameters:
vector - the Letter to be added.
Overrides:
addLetters in class ScrobblePlayer
 o removeLetters
 public void removeLetters()
Removes all Letters from the Player's Letters and sets the number of Letters of Player to zero.

 o removeLetters
 public void removeLetters(Vector letters) throws LetterNotInRackException
Removes the Letters contained in vector of the Player's Letters

Parameters:
vector - the vector of letter to be remove.
Throws: LetterNotInRackException
if a letter to be removed is not a letter of Player
 o main
 public static void main(String args[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index