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
.
-
nbletters
- Number of Letters of Player
-
playletters
- Contains the Letters of Player.
-
RQ_PLAYERCHANGELETTER
- The request which indicates the changement of letters of Player.
-
RQ_PLAYERCHANGENBLETTERS
- The request which changes the changement of the number of letters of Player.
-
ScrobblePlayer()
- Creates a new ScrobblePlayer
-
ScrobblePlayer(int, Object)
- Creates a new ScrobblePlayer with the informations contained in a
object.
-
ScrobblePlayer(String)
- Creates a new ScrobblePlayer with his name
-
ScrobblePlayer(String, GameLinkFilter)
- Creates a new ScrobblePlayer with his name and a gamelink
-
ScrobblePlayer(String, int)
- Creates a new ScrobblePlayer with his name and his identity.
-
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.
-
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.
-
getFrameDataPerso()
- Returns an object which contains the informations necessaries for the
constructions by a new client of its own scrobbleplayer.
-
getLetterAt(int)
- Returns the Letters of Player at the specified index.
-
getLetters()
- Returns the Letters of Player.
-
getNbLetters()
- Returns the number of Player's Letters.
-
toString()
- Returns a string representation of the object.
playletters
Vector playletters
- Contains the Letters of Player.
nbletters
int nbletters
- Number of Letters of Player
RQ_PLAYERCHANGELETTER
public static final int RQ_PLAYERCHANGELETTER
- The request which indicates the changement of letters of Player.
RQ_PLAYERCHANGENBLETTERS
public static final int RQ_PLAYERCHANGENBLETTERS
- The request which changes the changement of the number of letters of Player.
ScrobblePlayer
public ScrobblePlayer()
- Creates a new ScrobblePlayer
ScrobblePlayer
public ScrobblePlayer(String name)
- Creates a new ScrobblePlayer with his name
- Parameters:
- name - the ScrobblePlayer's name.
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.
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.
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.
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.
getNbLetters
public int getNbLetters()
- Returns the number of Player's Letters.
- Returns:
- the number of Letters of the Player.
getLetters
public Enumeration getLetters()
- Returns the Letters of Player.
- Returns:
- an enumeration of Player's Letters.
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.
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
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
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