Beispiel #1
0
 public override int GetHashCode()
 {
     unchecked {
         int hashCode = ID;
         hashCode = (hashCode * 397) ^ COST;
         hashCode = (hashCode * 397) ^ BARREL_NUMBER;
         hashCode = (hashCode * 397) ^ MAX_RANGE;
         hashCode = (hashCode * 397) ^ SHOT_SPEED.GetHashCode();
         hashCode = (hashCode * 397) ^ (ZONES?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
Beispiel #2
0
 protected bool Equals(Gun other)
 {
     return(ID == other.ID && COST == other.COST && BARREL_NUMBER == other.BARREL_NUMBER && MAX_RANGE == other.MAX_RANGE && SHOT_SPEED.Equals(other.SHOT_SPEED) && Equals(ZONES, other.ZONES));
 }