Bases: list[int]
, CustomEnum
CORNERS = [1, 0, 1, 0, 0, 1, 0, 1]
DIAMOND = [0, 1, 0, 1, 1, 0, 1, 0]
HORIZONTAL = [0, 0, 0, 1, 1, 0, 0, 0]
RECTANGLE = [1, 1, 1, 1, 1, 1, 1, 1]
VERTICAL = [0, 1, 0, 0, 0, 0, 1, 0]
Source code
| @classmethod
def from_iter(cls, iter: int) -> Coordinates:
return cls.DIAMOND if (iter % 3) != 1 else cls.RECTANGLE
|
Source code
| @classmethod
def from_xxpand_mode(cls, xxpand_mode: XxpandMode, iter: int = 1) -> Coordinates:
if xxpand_mode == XxpandMode.LOSANGE or (xxpand_mode is XxpandMode.ELLIPSE and iter % 3 != 1):
return cls.DIAMOND
return cls.RECTANGLE
|