Пример #1
0
        public static ZoneMap SetupSmallGrid()
        {
            var grid = ZoneMap.NewGridFromVector2(new Vector2(3f, 3f));

            grid.MapName = _smallGridZoneName;
            return(grid);
        }
Пример #2
0
        public void GetNeighboursCanGetNeighborsFromEdgeNode()
        {
            //Arrange
            var want = SetupZoneMap.GetNeighborsListForEdgeNode();

            //Act
            var grid = ZoneMap.NewGridFromVector2(new Vector2(3f, 3f));
            var got  = grid.GetNeighbours(grid.MapGrid[2, 2]);

            //Assert
            SetupZoneMap.AssertListGridNodesEqual(want, got);
        }
Пример #3
0
        public void CreateGridCanGenerateGridFromCorner()
        {
            var want = new Node[1, 1];

            want[0, 0] = new Node(Vector3.Zero);

            var zoneMap = ZoneMap.NewGridFromVector2(Vector2.One);
            var got     = zoneMap.MapGrid;

            Assert.Equal(want.Length, got.Length);
            SetupZoneMap.AssertGridMapEqual(want, got);
        }
Пример #4
0
        public void CanCreateGridWithMultipleNodes()
        {
            // Arrange
            var want = SetupZoneMap.SetupThreeByThreeGrid();

            // Act
            var grid = ZoneMap.NewGridFromVector2(new Vector2(3f, 3f));
            var got  = grid.MapGrid;

            // Assert
            Assert.Equal(want.Length, got.Length);
            SetupZoneMap.AssertGridMapEqual(want, got);
        }
Пример #5
0
        public static ZoneMap SetupFfxiSizeGrid()
        {
            var grid = ZoneMap.NewGridFromVector2(new Vector2(1001f, 1001f));

            return(grid);
        }
Пример #6
0
        public static ZoneMap SetupSuperBigGrid()
        {
            var grid = ZoneMap.NewGridFromVector2(new Vector2(101f, 101f));

            return(grid);
        }
Пример #7
0
        public static ZoneMap SetupBigGrid()
        {
            var grid = ZoneMap.NewGridFromVector2(new Vector2(51f, 51f));

            return(grid);
        }
Пример #8
0
        public static ZoneMap SetupMediumGrid()
        {
            var grid = ZoneMap.NewGridFromVector2(new Vector2(5f, 5f));

            return(grid);
        }