add limit for height and width

This commit is contained in:
2026-04-03 15:42:20 +02:00
parent 2532a35e30
commit ee4f48a5c0
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -483,7 +483,7 @@ def main() -> None:
"""Run the maze application.""" """Run the maze application."""
mlx = None mlx = None
try: try:
mlx = MazeMLX(1000, 1000) mlx = MazeMLX(1600, 2000)
config = Parsing.get_data_maze("config.txt") config = Parsing.get_data_maze("config.txt")
amazing = AMazeIng(**config) amazing = AMazeIng(**config)
mlx.start(amazing) mlx.start(amazing)
+2 -2
View File
@@ -1,5 +1,5 @@
WIDTH=15 WIDTH=100
HEIGHT=15 HEIGHT=100
ENTRY=1,1 ENTRY=1,1
EXIT=5,7 EXIT=5,7
OUTPUT_FILE=con OUTPUT_FILE=con
Binary file not shown.
+2 -2
View File
@@ -12,8 +12,8 @@ class AMazeIng(BaseModel):
model_config = ConfigDict(arbitrary_types_allowed=True) model_config = ConfigDict(arbitrary_types_allowed=True)
width: int = Field(ge=4) width: int = Field(ge=4, le=100)
height: int = Field(ge=4) height: int = Field(ge=4, le=100)
entry: tuple[int, int] entry: tuple[int, int]
exit: tuple[int, int] exit: tuple[int, int]
output_file: str = Field(min_length=3) output_file: str = Field(min_length=3)