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

            return
                ((
                     EnergyCubes == other.EnergyCubes ||
                     EnergyCubes.Equals(other.EnergyCubes)
                     ) &&
                 (
                     Health == other.Health ||
                     Health.Equals(other.Health)
                 ) &&
                 (
                     Active == other.Active ||
                     Active.Equals(other.Active)
                 ) &&
                 (
                     Virtual == other.Virtual ||
                     Virtual.Equals(other.Virtual)
                 ) &&
                 (
                     Priority == other.Priority ||
                     Priority.Equals(other.Priority)
                 ) &&
                 (
                     OnTurn == other.OnTurn ||
                     OnTurn.Equals(other.OnTurn)
                 ) &&
                 (
                     IsMine == other.IsMine ||
                     IsMine.Equals(other.IsMine)
                 ) &&
                 (
                     HandCards == other.HandCards ||
                     HandCards.Equals(other.HandCards)
                 ) &&
                 (
                     Attitude == other.Attitude ||
                     Attitude.Equals(other.Attitude)
                 ) &&
                 (
                     Type == other.Type ||
                     Type.Equals(other.Type)
                 ));
        }
Beispiel #2
0
        /// <summary>
        ///     Returns true if Player instances are equal
        /// </summary>
        /// <param name="other">Instance of Player to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Player other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id.Equals(other.Id)
                     ) &&
                 (
                     ControlledEntities == other.ControlledEntities ||
                     ControlledEntities != null &&
                     other.ControlledEntities != null &&
                     ControlledEntities.SequenceEqual(other.ControlledEntities)
                 ) &&
                 (
                     OnTurn == other.OnTurn ||
                     OnTurn.Equals(other.OnTurn)
                 ) &&
                 (
                     Active == other.Active ||
                     Active.Equals(other.Active)
                 ) &&
                 (
                     DisplayName == other.DisplayName ||
                     DisplayName != null &&
                     DisplayName.Equals(other.DisplayName)
                 ));
        }
        /// <summary>
        ///     Returns true if RobotInfo instances are equal
        /// </summary>
        /// <param name="other">Instance of RobotInfo to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(RobotInfo other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Direction == other.Direction ||
                     Direction.Equals(other.Direction)
                     ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Id == other.Id ||
                     Id.Equals(other.Id)
                 ) &&
                 (
                     Location == other.Location ||
                     Location != null &&
                     Location.Equals(other.Location)
                 ) &&
                 (
                     EnergyCubes == other.EnergyCubes ||
                     EnergyCubes.Equals(other.EnergyCubes)
                 ) &&
                 (
                     Health == other.Health ||
                     Health.Equals(other.Health)
                 ) &&
                 (
                     Active == other.Active ||
                     Active.Equals(other.Active)
                 ) &&
                 (
                     Virtual == other.Virtual ||
                     Virtual.Equals(other.Virtual)
                 ) &&
                 (
                     Priority == other.Priority ||
                     Priority.Equals(other.Priority)
                 ) &&
                 (
                     OnTurn == other.OnTurn ||
                     OnTurn.Equals(other.OnTurn)
                 ) &&
                 (
                     IsMine == other.IsMine ||
                     IsMine.Equals(other.IsMine)
                 ) &&
                 (
                     HandCards == other.HandCards ||
                     HandCards.Equals(other.HandCards)
                 ) &&
                 (
                     Attitude == other.Attitude ||
                     Attitude.Equals(other.Attitude)
                 ) &&
                 (
                     Type == other.Type ||
                     Type.Equals(other.Type)
                 ));
        }