コード例 #1
0
 /// <summary>
 /// Determines whether this object is equal to another object. They are
 /// considered equal, if the other object is enumerable and contains
 /// the same moves in the same order.
 /// </summary>
 /// <param name="obj">The object to compare to.</param>
 /// <returns>
 /// Whether this object is equal to the other object.
 /// </returns>
 public override bool Equals(object obj)
 {
     if (obj is IEnumerable <Move> )
     {
         return(Alg.AreEqual(this, obj as IEnumerable <Move>));
     }
     else
     {
         return(false);
     }
 }
コード例 #2
0
 /// <summary>
 /// Determines whether this alg is equal to another alg. They are
 /// considered equal, if both contain the same moves in the same
 /// order.
 /// </summary>
 /// <param name="other">The alg to compare to.</param>
 /// <returns>
 /// Whether this alg is equal to the other alg.
 /// </returns>
 public bool Equals(IEnumerable <Move> other)
 => Alg.AreEqual(this, other);