/// <summary> /// Contains the player. /// </summary> /// <param name="player">The player.</param> /// <returns>bool if Contains player</returns> public bool ContainPlayer(ClientOfServer player) { if (Guest.Equals(player) || Host.Equals(player)) { return(true); } return(false); }
/// <summary> /// Contains the player. /// </summary> /// <param name="player">The player.</param> /// <returns>bool if Contains player</returns> public bool ContainPlayer(string player) { if (Guest.Equals(player) || Host.Equals(player)) { return(true); } return(false); }
/// <summary> /// Gets the other player. /// </summary> /// <param name="player">The player.</param> /// <returns>the tcp client</returns> /// <exception cref="System.Exception">the player does not exist</exception> public ClientOfServer GetTheOtherPlayer(ClientOfServer player) { if (Host.Equals(player)) { return(Guest); } if (Guest.Equals(player)) { return(Host); } throw new Exception("the player does not exist"); }
/// <summary> /// Gets the other player. /// </summary> /// <param name="player">The player.</param> /// <returns>the tcp client</returns> /// <exception cref="System.Exception">the player does not exist</exception> public string GetTheOtherPlayer(string player) { if (Host.Equals(player)) { return(Guest); } if (Guest.Equals(player)) { return(Host); } throw new Exception("the player does not exist"); }
public void TestEqualsExpectedTrue() { this.guest.Id = 1; Guest test = new Guest { Id = 1 }; Assert.IsTrue(guest.Equals(test)); }