/// <summary> /// Initializes the values of this instance with the provided connection and name. /// </summary> /// <param name="connection"></param> /// <param name="name"></param> public void Initialize(Socket connection, string name) { this.id = id_counter; this.name = name; this.connection = connection; this.alive = true; this.score = 0; this.ready = false; id_counter++; ReadyToggled += new ReadyToggledHandler(Player_ReadyToggled); PlayerLost += new PlayerLostHandler(Player_PlayerLost); }
/// <summary> /// Initializes the values of this instance with the provided connection and name. /// </summary> /// <param name="connection"></param> /// <param name="name"></param> public void Initialize(Socket connection, string name) { this.id = id_counter; this.name = name; this.connection = connection; this.alive = true; this.score = 0; this.ready = false; id_counter++; ReadyToggled += new ReadyToggledHandler(Player_ReadyToggled); PlayerLost += new PlayerLostHandler(Player_PlayerLost); }