예제 #1
0
        /// <summary>
        /// Returns true if Thing instances are equal
        /// </summary>
        /// <param name="other">Instance of Thing to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(FriendFinder other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     NickName == other.NickName ||
                     NickName != null &&
                     NickName.Equals(other.NickName)
                     ) &&
                 (
                     Lat == other.Lat ||
                     Lat != null &&
                     Lat.Equals(other.Lat)
                 ) &&
                 (
                     LastSeen == other.LastSeen ||
                     LastSeen != null &&
                     LastSeen.Equals(other.LastSeen)
                 ) &&
                 (
                     Lon == other.Lon ||
                     Lon != null &&
                     Lon.Equals(other.Lon)
                 ));
        }
        public virtual bool CanStartInGame => true; //clue will have exceptions.

        public override bool Equals(object obj)
        {
            if (!(obj is SimplePlayer Temps))
            {
                return(false);
            }
            return(NickName.Equals(Temps.NickName));
        }
예제 #3
0
        public string GenerateChannelName()
        {
            string channeName = "";

            if (NickName == null || NickName.Equals(""))
            {
                channeName = Name;
            }
            else
            {
                channeName = NickName;
            }

            return("sl-mit-" + channeName.ToLower().Replace(" ", "-").Replace("(", "").Replace(")", "").Replace("/", "").Replace(".", "").Replace("|", "").Replace("--", "-").Replace("---", "-"));
        }
 public bool Equals(SimplePlayer other)
 {
     return(NickName.Equals(other.NickName));
 }