Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public _RoomTypeCost(_RoomType type1, _RoomType type2, int cost)
 {
     this.type1 = type1;
     this.type2 = type2;
     Cost       = cost;
 }