GridWorld.get_area_shape#

GridWorld.get_area_shape(area)[source]#

Get the shape of one area.

Parameters:

area (int or str) – Index or name of the area to get its shape.

Returns:

shape – Shape of the area with index area_idx.

Return type:

tuple of ints

Examples

>>> W = GridWorld()
>>> W.add_area((3, 10))
>>> W.get_area_shape(1)
(3, 10)
>>> W.add_area((5, 10), name="Right")
>>> W.get_area_shape("Right")
(5, 10)