game: add: goal statistic
This commit is contained in:
@ -8,12 +8,12 @@ class Player
|
||||
* @param {Number} id
|
||||
* @param {Game} game
|
||||
* @param {Segment} rail
|
||||
* @param {Number} nb_goal
|
||||
* @param {[Number]} score
|
||||
* @param {Number} position
|
||||
* @param {Boolean} is_connected
|
||||
* @param {String} username
|
||||
*/
|
||||
constructor(game, id, username, rail, nb_goal, position, is_connected)
|
||||
constructor(game, id, username, score, rail, position, is_connected)
|
||||
{
|
||||
/**
|
||||
* @type {Game}
|
||||
@ -36,9 +36,9 @@ class Player
|
||||
this.position = position;
|
||||
|
||||
/**
|
||||
* @type {Number}
|
||||
* @type {[Number]}
|
||||
*/
|
||||
this.nb_goal = nb_goal;
|
||||
this.score = score;
|
||||
|
||||
/**
|
||||
* @type {Segment}
|
||||
@ -102,7 +102,7 @@ class Player
|
||||
this.is_connected = data.is_connected;
|
||||
this.id = data.user_id;
|
||||
this.position = data.position.position ;
|
||||
this.nb_goal = data.nb_goal;
|
||||
this.score = data.score;
|
||||
this.rail = this.rail.from_json(data.rail);
|
||||
this.username = data.username;
|
||||
|
||||
|
Reference in New Issue
Block a user