public override bool Equals(object obj) { _RoomType a = obj as _RoomType; if (a == null) { return(false); } return(this.typeid == a.typeid); //return Close(a.X, X) && Close(a.Y, Y); //return base.Equals(obj); }
public static int FindCost(_RoomType t1, _RoomType t2) { if (!initialized) { Initialize(); } int cost = 0; _RoomTypeCost type = typeCosts.FirstOrDefault(i => i.type1.Equals(t1) && i.type2.Equals(t2)); if (type != null) { cost = type.Cost; } return(cost); }
public _RoomTypeCost(_RoomType type1, _RoomType type2, int cost) { this.type1 = type1; this.type2 = type2; Cost = cost; }