예제 #1
0
파일: _RoomType.cs 프로젝트: kasznare/DIP1
        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);
        }
예제 #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);
        }
예제 #3
0
 public _RoomTypeCost(_RoomType type1, _RoomType type2, int cost)
 {
     this.type1 = type1;
     this.type2 = type2;
     Cost       = cost;
 }