public void Init()
        {
            _routeProposal = new PatrolRouteProposal(_map, new XYZ(0, 0, 0), path => { });
            var builder = new LayerBuilder(3, 3);

            builder.PutFloor(new XY(0, 0), new XY(2, 2));
            _map.Add(_layer = builder.Build());
        }
Beispiel #2
0
        public void LayerBuilder_PutFloor_FloorWithCorrectObjectLayer()
        {
            var builder = new LayerBuilder(3, 3);

            builder.PutFloor(1, 1);
            var layer = builder.Build();

            Assert.IsTrue(layer[1, 1].Ground.ObjectLayer == ObjectLayer.Ground);
        }
Beispiel #3
0
        public void LayerBuilder_PutFloorRectangle_FloorCorrectlyAdded()
        {
            var builder = new LayerBuilder(3, 3);

            builder.PutFloor(new XY(0, 0), new XY(2, 2));
            var layer = builder.Build();

            AssertContains(new XY(0, 0), new XY(2, 2), layer, FacilityObjectNames.Floor);
        }
Beispiel #4
0
        public void LayerBuilder_PutSingleFloorSpace_FloorCorrectlyAdded()
        {
            var builder = new LayerBuilder(3, 3);

            builder.PutFloor(1, 1);
            var layer = builder.Build();

            AssertContains(1, 1, layer, FacilityObjectNames.Floor);
        }
        public void Init()
        {
            _thief = new Thief(this, _map);
            _thief.Subscribe(this);
            var builder = new LayerBuilder(3, 3);

            builder.PutFloor(new XY(0, 0), new XY(2, 2));
            AddPortals(builder);
            _map.Add(_layer = builder.Build());
            _upFacingContainer.Put(_upFacingValuable);
            _rightFacingContainer.Put(_valuable2);
        }
Beispiel #6
0
        public void LayerBuilder_OnBuild_WallsCorrectlyAdded()
        {
            var builder = new LayerBuilder(3, 3);

            builder.PutFloor(1, 1);
            var layer = builder.Build();

            AssertContains(new XY(0, 0), new XY(0, 2), layer, "Wall");
            AssertContains(new XY(0, 0), new XY(2, 0), layer, "Wall");
            AssertContains(new XY(2, 0), new XY(2, 2), layer, "Wall");
            AssertContains(new XY(0, 2), new XY(2, 2), layer, "Wall");
        }
Beispiel #7
0
        public void LayerBuilder_PutUpperObject_ObjectPutCorrectly()
        {
            var builder  = new LayerBuilder(3, 3);
            var painting = new FacilityObject {
                Type = "Painting", Orientation = Orientation.Right, ObjectLayer = ObjectLayer.UpperObject
            };

            builder.PutFloor(1, 1);
            builder.Put(0, 1, painting);
            var layer = builder.Build();

            Assert.IsTrue(layer[0, 1].Contains(painting));
            Assert.AreEqual(painting, layer[0, 1].UpperObject);
        }
Beispiel #8
0
        public void LayerBuilder_PutLowerObject_ObjectPutCorrectly()
        {
            var builder = new LayerBuilder(3, 3);
            var cash    = new FacilityObject {
                Type = "Cash", Orientation = Orientation.Up, ObjectLayer = ObjectLayer.LowerObject
            };

            builder.PutFloor(1, 1);
            builder.Put(1, 1, cash);
            var layer = builder.Build();

            Assert.IsTrue(layer[1, 1].Contains(cash));
            Assert.AreEqual(cash, layer[1, 1].LowerObject);
        }