All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class scrobble.ScrobblePlayer

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

public class ScrobblePlayer
extends Player
The ScrobblePlayer class adds the two methods frameReceived and createLinkframe to Player, so that a ScrobblePlayer can create or receive a frame. It implements interface GameLinkListener.


Variable Index

 o nbletters
Number of Letters of Player
 o playletters
Contains the Letters of Player.
 o RQ_PLAYERCHANGELETTER
The request which indicates the changement of letters of Player.
 o RQ_PLAYERCHANGENBLETTERS
The request which changes the changement of the number of letters of Player.

Constructor Index

 o ScrobblePlayer()
Creates a new ScrobblePlayer
 o ScrobblePlayer(int, Object)
Creates a new ScrobblePlayer with the informations contained in a object.
 o ScrobblePlayer(String)
Creates a new ScrobblePlayer with his name
 o ScrobblePlayer(String, GameLinkFilter)
Creates a new ScrobblePlayer with his name and a gamelink
 o ScrobblePlayer(String, int)
Creates a new ScrobblePlayer with his name and his identity.

Method Index

 o addLetters(Vector)
adds a vector of Letters in the letters of Player and increases the number of Letters of the Player by the number of Letters added.
 o getFrameData()
Returns an object which contains the informations necessaries for the constructions by a new client of a Scrobbleplayer, which still exists in the server.
 o getFrameDataPerso()
Returns an object which contains the informations necessaries for the constructions by a new client of its own scrobbleplayer.
 o getLetterAt(int)
Returns the Letters of Player at the specified index.
 o getLetters()
Returns the Letters of Player.
 o getNbLetters()
Returns the number of Player's Letters.
 o toString()
Returns a string representation of the object.

Variables

 o playletters
 Vector playletters
Contains the Letters of Player.

 o nbletters
 int nbletters
Number of Letters of Player

 o RQ_PLAYERCHANGELETTER
 public static final int RQ_PLAYERCHANGELETTER
The request which indicates the changement of letters of Player.

 o RQ_PLAYERCHANGENBLETTERS
 public static final int RQ_PLAYERCHANGENBLETTERS
The request which changes the changement of the number of letters of Player.

Constructors

 o ScrobblePlayer
 public ScrobblePlayer()
Creates a new ScrobblePlayer

 o ScrobblePlayer
 public ScrobblePlayer(String name)
Creates a new ScrobblePlayer with his name

Parameters:
name - the ScrobblePlayer's name.
 o ScrobblePlayer
 public ScrobblePlayer(int id,
                       Object frameData)
Creates a new ScrobblePlayer with the informations contained in a object.

Parameters:
frameData - the object which contains the informations about the ScrobblePlayer.
 o ScrobblePlayer
 public ScrobblePlayer(String name,
                       GameLinkFilter gamelink)
Creates a new ScrobblePlayer with his name and a gamelink

Parameters:
name - the ScrobblePlayer's name.
gamelink - the ScrobblePlayer's gamelink.
 o ScrobblePlayer
 public ScrobblePlayer(String name,
                       int id)
Creates a new ScrobblePlayer with his name and his identity.

Parameters:
name - the ScrobblePlayer's name.
id - the identity of Player.

Methods

 o addLetters
 public void addLetters(Vector vector)
adds a vector of Letters in the letters of Player and increases the number of Letters of the Player by the number of Letters added.

Parameters:
vector - the Letter to be added.
 o getNbLetters
 public int getNbLetters()
Returns the number of Player's Letters.

Returns:
the number of Letters of the Player.
 o getLetters
 public Enumeration getLetters()
Returns the Letters of Player.

Returns:
an enumeration of Player's Letters.
 o getLetterAt
 public Letter getLetterAt(int index)
Returns the Letters of Player at the specified index.

Parameters:
index - the index of the letter returned.
Returns:
the vector of Player's Letters.
 o getFrameData
 public Object getFrameData()
Returns an object which contains the informations necessaries for the constructions by a new client of a Scrobbleplayer, which still exists in the server.

Returns:
the object which contains the informations about the scrobbleplayer.
Overrides:
getFrameData in class Player
 o getFrameDataPerso
 public Object getFrameDataPerso()
Returns an object which contains the informations necessaries for the constructions by a new client of its own scrobbleplayer.

Returns:
the object which contains the informations about the scrobbleplayer.
Overrides:
getFrameDataPerso in class Player
 o toString
 public String toString()
Returns a string representation of the object.

Overrides:
toString in class Player

All Packages  Class Hierarchy  This Package  Previous  Next  Index