public static void AddCost(_RoomTypeCost c) { if (typeCosts.Contains(c) || typeCosts.Contains(c.getInverse())) { return; } typeCosts.Add(c); typeCosts.Add(c.getInverse()); }
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); }