public override bool Equals(object other) { if (other.GetType() == typeof(MZEdge)) { MZEdge o = (MZEdge)other; return(targetRoomId == o.targetRoomId && (Symbol == o.Symbol || Symbol.Equals(o.Symbol))); } else { return(base.Equals(other)); } }
public MZEdge SetEdge(int targetRoomId, MZSymbol symbol) { MZEdge e = GetEdge(targetRoomId); if (e != null) { e.Symbol = symbol; } else { e = new MZEdge(targetRoomId, symbol); edges.Add(e); } return(e); }