Package squidpony.squidgrid.mapping
Interface Rectangle
- All Superinterfaces:
Iterable<Coord>
,Serializable
,Zone
- All Known Implementing Classes:
Rectangle.Impl
public interface Rectangle extends Zone
Rectangles in 2D grids. Checkout
Rectangle.Utils
for utility methods.- Author:
- smelC
- See Also:
How to find rectangles in a dungeon
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Rectangle.Impl
static class
Rectangle.Utils
Utilities pertaining toRectangle
Nested classes/interfaces inherited from interface squidpony.squidgrid.zone.Zone
Zone.Helper, Zone.Skeleton
-
Method Summary
Modifier and Type Method Description Coord
getBottomLeft()
int
getHeight()
int
getWidth()
Methods inherited from interface squidpony.squidgrid.zone.Zone
contains, contains, contains, extend, getAll, getCenter, getDiagonal, getExternalBorder, getInternalBorder, intersectsWith, isEmpty, size, translate, translate, xBound, yBound
-
Method Details
-
getBottomLeft
- Returns:
- The bottom left coordinate of the room.
-
getWidth
int getWidth()- Specified by:
getWidth
in interfaceZone
- Returns:
- The room's width (from
getBottomLeft()
). It is greater or equal than 0.
-
getHeight
int getHeight()- Specified by:
getHeight
in interfaceZone
- Returns:
- The room's height (from
getBottomLeft()
). It is greater or equal than 0.
-