This commit is contained in:
Eden Kirin
2023-05-12 20:39:31 +02:00
parent 21a7f111b2
commit afbb3d7436
3 changed files with 12 additions and 14 deletions

View File

@ -14,6 +14,13 @@ BOARD_DUMP_CHARS: dict[ObjectType, str] = {
}
def create_random_position(board_width: int, board_height: int) -> Position:
return Position(
x=random.randint(0, board_width - 1),
y=random.randint(0, board_height - 1),
)
@dataclass
class LayerObject:
type_: ObjectType
@ -102,10 +109,3 @@ class BoardLayout:
)
)
return layers
def create_random_position(board_width: int, board_height: int) -> Position:
return Position(
x=random.randint(0, board_width - 1),
y=random.randint(0, board_height - 1),
)