public void Put(ObjectInstruction inst, XY roomLocation)
        {
            var obj = FacilityObjectFactory.Create(inst.ObjectName);

            obj.Orientation = inst.Location.Orientation;
            _layer[roomLocation.Plus(inst.Location)].Put(obj);
        }
Beispiel #2
0
 public IEnumerable <XYLocation <FacilitySpace> > GetAdjacentLocations(XY xy)
 {
     return(xy.Plus(-1, -1).Thru(xy.Plus(1, 1))
            .Where(x => (Math.Abs(x.X) + Math.Abs(x.Y)).Equals(1))
            .Select(GetLocationSpace));
 }
Beispiel #3
0
 public IEnumerable <XYLocation <FacilitySpace> > GetNeighbors(XY xy)
 {
     return(xy.Plus(-1, -1).Thru(xy.Plus(1, 1))
            .Where(x => IsInBounds(x) && !x.Equals(xy))
            .Select(GetLocationSpace));
 }