/////////
//written by cdjhlee
//filename: game/user.js
//role
//game user class
//////////

function User(obj) {
  this._game = obj.game;
  this.id = obj.id;
  this.type = obj.type;
  this.nick = obj.nick;
  this.ready = false;

  return this;
}
module.exports = User;

/**
 * Ready를 한다.
 * @param ready:Boolean
 */
 User.prototype.setReady = function(ready) {
  this.ready = ready;
  this._game.emit('ready', this);
 };
