merge Feature/leave lobby into master #2

Merged
SemvdH merged 6 commits from feature/leaveLobby into master 2020-10-21 20:34:28 +00:00
Showing only changes of commit 9e1ac07b80 - Show all commits

View File

@@ -27,6 +27,30 @@ namespace SharedClientServer
_host = false;
}
public static bool operator ==(User u1, User u2)
{
return u1.Username == u2.Username;
}
public static bool operator !=(User u1, User u2)
{
return u1.Username != u2.Username;
}
public override bool Equals(object obj)
{
if ((obj == null) || !this.GetType().Equals(obj.GetType()))
{
return false;
}
else
{
User other = obj as User;
return other.Username == this.Username;
}
}
public string Username
{
get { return _username; }