override public int CompareTo(MemoryItem compareTo) { int same = 1; try { MemoryShape other = (MemoryShape)compareTo; if (Shape == other.Shape) { same = 0; } } catch (Exception e) { throw new Exception(message: "Cannot convert MemoryItem to MemoryShape."); } return(same); }
/// <summary> /// Checks if this letter is the same as another /// </summary> /// <param name="compareTo"></param> /// <returns></returns> override public int CompareTo(MemoryItem compareTo) { int same = 1; try { MemoryLetter other = (MemoryLetter)compareTo; if (Letter.Equals(other.Letter)) { same = 0; } } catch (Exception e) { throw new Exception(message: "Cannot convert MemoryItem to MemoryLetter."); } return(same); }
override public int CompareTo(MemoryItem compareTo) { int same = 0; return(same); }