File tree Expand file tree Collapse file tree
source_code_final/src/maze_solver/models
source_code_step_3/src/maze_solver/models
source_code_step_4/src/maze_solver/models
source_code_step_5/src/maze_solver/models Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class Solution:
1313 def __post_init__ (self ) -> None :
1414 assert self .squares [0 ].role is Role .ENTRANCE
1515 assert self .squares [- 1 ].role is Role .EXIT
16- reduce (validate_collinear , self .squares )
16+ reduce (validate_corridor , self .squares )
1717
1818 def __iter__ (self ) -> Iterator [Square ]:
1919 return iter (self .squares )
@@ -25,8 +25,8 @@ def __len__(self) -> int:
2525 return len (self .squares )
2626
2727
28- def validate_collinear (current : Square , following : Square ) -> Square :
28+ def validate_corridor (current : Square , following : Square ) -> Square :
2929 assert any (
3030 [current .row == following .row , current .column == following .column ]
31- ), "Squares must be collinear "
31+ ), "Squares must lie in the same row or column "
3232 return following
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class Solution:
1313 def __post_init__ (self ) -> None :
1414 assert self .squares [0 ].role is Role .ENTRANCE
1515 assert self .squares [- 1 ].role is Role .EXIT
16- reduce (validate_collinear , self .squares )
16+ reduce (validate_corridor , self .squares )
1717
1818 def __iter__ (self ) -> Iterator [Square ]:
1919 return iter (self .squares )
@@ -25,8 +25,8 @@ def __len__(self) -> int:
2525 return len (self .squares )
2626
2727
28- def validate_collinear (current : Square , following : Square ) -> Square :
28+ def validate_corridor (current : Square , following : Square ) -> Square :
2929 assert any (
3030 [current .row == following .row , current .column == following .column ]
31- ), "Squares must be collinear "
31+ ), "Squares must lie in the same row or column "
3232 return following
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class Solution:
1313 def __post_init__ (self ) -> None :
1414 assert self .squares [0 ].role is Role .ENTRANCE
1515 assert self .squares [- 1 ].role is Role .EXIT
16- reduce (validate_collinear , self .squares )
16+ reduce (validate_corridor , self .squares )
1717
1818 def __iter__ (self ) -> Iterator [Square ]:
1919 return iter (self .squares )
@@ -25,8 +25,8 @@ def __len__(self) -> int:
2525 return len (self .squares )
2626
2727
28- def validate_collinear (current : Square , following : Square ) -> Square :
28+ def validate_corridor (current : Square , following : Square ) -> Square :
2929 assert any (
3030 [current .row == following .row , current .column == following .column ]
31- ), "Squares must be collinear "
31+ ), "Squares must lie in the same row or column "
3232 return following
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class Solution:
1313 def __post_init__ (self ) -> None :
1414 assert self .squares [0 ].role is Role .ENTRANCE
1515 assert self .squares [- 1 ].role is Role .EXIT
16- reduce (validate_collinear , self .squares )
16+ reduce (validate_corridor , self .squares )
1717
1818 def __iter__ (self ) -> Iterator [Square ]:
1919 return iter (self .squares )
@@ -25,8 +25,8 @@ def __len__(self) -> int:
2525 return len (self .squares )
2626
2727
28- def validate_collinear (current : Square , following : Square ) -> Square :
28+ def validate_corridor (current : Square , following : Square ) -> Square :
2929 assert any (
3030 [current .row == following .row , current .column == following .column ]
31- ), "Squares must be collinear "
31+ ), "Squares must lie in the same row or column "
3232 return following
You can’t perform that action at this time.
0 commit comments