예제 #1
0
 public bool Equals(GameState other)
 {
     if (ReferenceEquals(other, null))
     {
         return(false);
     }
     if (ReferenceEquals(other, this))
     {
         return(true);
     }
     if (StateId != other.StateId)
     {
         return(false);
     }
     if (!BoardNames.Equals(other.BoardNames))
     {
         return(false);
     }
     if (!PlayerNames.Equals(other.PlayerNames))
     {
         return(false);
     }
     if (!MonsterNames.Equals(other.MonsterNames))
     {
         return(false);
     }
     return(Equals(_unknownFields, other._unknownFields));
 }
예제 #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (StateId != 0L)
            {
                hash ^= StateId.GetHashCode();
            }
            hash ^= BoardNames.GetHashCode();
            hash ^= PlayerNames.GetHashCode();
            hash ^= MonsterNames.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }