DivineRightGame.Managers.HelperObjects.Region.IsNeighbour C# (CSharp) Method

IsNeighbour() public method

Returns true if this block is a distance of 1 away from any of the blocks in this region
public IsNeighbour ( MapBlock block ) : bool
block DRObjects.MapBlock
return bool
        public bool IsNeighbour(MapBlock block)
        {
            return Blocks.Any(b => Math.Abs(b.Tile.Coordinate - block.Tile.Coordinate) <= 1);
        }

Same methods

Region::IsNeighbour ( Region region ) : bool