Skip to content

Commit 0e5abd9

Browse files
remove deprecated HexGrid class (#2441)
* remove deprecated HexGrid class closes #1847 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 92054d7 commit 0e5abd9

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

mesa/space.py

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,36 +1287,6 @@ class HexMultiGrid(_HexGrid, MultiGrid):
12871287
"""
12881288

12891289

1290-
class HexGrid(HexSingleGrid):
1291-
"""Hexagonal Grid: a Grid where neighbors are computed according to a hexagonal tiling of the grid.
1292-
1293-
Functions according to odd-q rules.
1294-
See http://www.redblobgames.com/grids/hexagons/#coordinates for more.
1295-
1296-
Properties:
1297-
width, height: The grid's width and height.
1298-
torus: Boolean which determines whether to treat the grid as a torus.
1299-
"""
1300-
1301-
def __init__(self, width: int, height: int, torus: bool) -> None:
1302-
"""Initializes a HexGrid, deprecated.
1303-
1304-
Args:
1305-
width: the width of the grid
1306-
height: the height of the grid
1307-
torus: whether the grid wraps
1308-
"""
1309-
super().__init__(width, height, torus)
1310-
warn(
1311-
(
1312-
"HexGrid is being deprecated; use instead HexSingleGrid or HexMultiGrid "
1313-
"depending on your use case."
1314-
),
1315-
DeprecationWarning,
1316-
stacklevel=2,
1317-
)
1318-
1319-
13201290
class ContinuousSpace:
13211291
"""Continuous space where each agent can have an arbitrary position.
13221292

0 commit comments

Comments
 (0)