Player - Pihl17/PCSS2018---TheRealGroup1-Client GitHub Wiki

Player class

implements java.io.Serializable

Constructor

Player(String userId, int avatar) Creates a Player object with the String argument for it's userId and setting a avatar based on the avatar number (takes between 1-6)
Player(String userId, String nickName, int avatar) Creates a Player object with the String arguments for it's userId and nickName, and setting a avatar based on the avatar number (takes between 1-6)
Player(String userId, String nickName, Label label) Creates a Player object with the String arguments for it's userId and nickName, and sets it's display label as the Label argument

Methods

void SetUserId(String id) changes the player object's userId
String GetUserId() Returns userId
void SetNickName(String nickName) changes the object's nickName variable
String GetNickName() Returns nickName
void SetAvatar(int avatar) Sets the object's label based on the value of avatar (takes between 1-6)
int GetAvatarNumber() Returns an int of value between 1-6 based on the current label
Label GetLabel() Returns the object's label
void SetLabel(Label label) Assigns the label
Action GetAction() returns the object's action
void SetAction(Action action) Sets the object's action