To recap, the function is supposed to create a polygon with sides of equal length.
I was thinking of either reimplementing his PR's design to look more like this:
def RegularPolygon(pos, radius) -> Polygon
# So we would use it like this
geometry.RegularPolygon(...)
Or we can do something like this
class RegularPolygon(Polygon):
def __init__(self, pos, radius): ...
If RegularPolygon becomes a child class of Polygon, the user would be able to modify its radius, origin_pos, etc on the go, where as if we implement the function method, the user would need to create a new Polygon when they want to change its radius as well as using a for loop to change every point to the Polygon
@Emc2356 has already done a PR that does exactly this, but not in what I hoped. https://github.com/novialriptide/pygame_geometry/pull/73
To recap, the function is supposed to create a polygon with sides of equal length.
I was thinking of either reimplementing his PR's design to look more like this:
Or we can do something like this
If
RegularPolygon
becomes a child class ofPolygon
, the user would be able to modify itsradius
,origin_pos
, etc on the go, where as if we implement the function method, the user would need to create a newPolygon
when they want to change its radius as well as using afor
loop to change every point to thePolygon