public void IsOpen_CoversExistingButIsInException_True()
        {
            var generator = new DelaunayGenerator(BattleMap, new DelaunayGeneratorOptions());

            BattleMap.Tiles[2, 2] = new GridNode(Tiles.Wall, new Vec2(2, 2), BattleMap.Tiles);

            Assert.IsTrue(generator.IsOpen(new Rect(3, 3), new Vec2(2, 2)));
        }
        public void IsOpen_NewContainsExisting_False()
        {
            var generator = new DelaunayGenerator(BattleMap, new DelaunayGeneratorOptions());

            BattleMap.Tiles[4, 4] = new GridNode(Tiles.Wall, new Vec2(4, 4), BattleMap.Tiles);

            Assert.IsFalse(generator.IsOpen(new Rect(0, 0, 10, 10), null));
        }
        public void IsOpen_OverlapsExisting_False()
        {
            var generator = new DelaunayGenerator(BattleMap, new DelaunayGeneratorOptions());

            BattleMap.Tiles[2, 2] = new GridNode(Tiles.Wall, new Vec2(2, 2), BattleMap.Tiles);

            Assert.IsFalse(generator.IsOpen(new Rect(3, 3), null));
        }
        public void IsOpen_ExistingContainsNew_False()
        {
            var generator = new DelaunayGenerator(BattleMap, new DelaunayGeneratorOptions());

            foreach (var tile in new Rect(10, 10))
            {
                BattleMap.Tiles[tile.x, tile.y] = new GridNode(Tiles.Wall, new Vec2(tile.x, tile.y), BattleMap.Tiles);
            }

            Assert.IsFalse(generator.IsOpen(new Rect(3, 3, 2, 2), null));
        }
        public void IsOpen_IsOpen_True()
        {
            var generator = new DelaunayGenerator(BattleMap, new DelaunayGeneratorOptions());

            Assert.IsTrue(generator.IsOpen(new Rect(3, 3), null));
        }
        public void IsOpen_RectOutOfBoundsY_False()
        {
            var generator = new DelaunayGenerator(BattleMap, new DelaunayGeneratorOptions());

            Assert.IsFalse(generator.IsOpen(new Rect(1, -1, 10, 10), null));
        }