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.
-
ServerScrobblePlayer()
- Creates a new ServerScrobblePlayer
-
ServerScrobblePlayer(String)
- creates a new ServerScrobblePlayer with his name.
-
ServerScrobblePlayer(String, GameLinkFilter)
- Creates a new ServerScrobblePlayer with his name and a gamelink.
-
addLetter(Letter)
- Adds a Letter in the letters of Player and increases the number of Letters of the Player by one.
-
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.
-
main(String[])
-
-
removeLetters()
- Removes all Letters from the Player's Letters
and sets the number of Letters of Player to zero.
-
removeLetters(Vector)
- Removes the Letters contained in vector of the Player's Letters
-
sendChangement(Vector)
- Notify the ClientPlayer that his letters has changed and sends the new letters.
ServerScrobblePlayer
public ServerScrobblePlayer()
- Creates a new ServerScrobblePlayer
ServerScrobblePlayer
public ServerScrobblePlayer(String name)
- creates a new ServerScrobblePlayer with his name.
- Parameters:
- name - the ServerScrobblePlayer's name.
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.
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.
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.
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
removeLetters
public void removeLetters()
- Removes all Letters from the Player's Letters
and sets the number of Letters of Player to zero.
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
main
public static void main(String args[])
All Packages Class Hierarchy This Package Previous Next Index