day23 faster
This commit is contained in:
parent
bb5524601a
commit
3940c75527
4 changed files with 149 additions and 89 deletions
|
|
@ -27,7 +27,7 @@ class Map:
|
|||
map = list(input)
|
||||
width = len(map[0])
|
||||
height = len(map)
|
||||
return Map(map, Position(width, height))
|
||||
return Map(map, Position(width - 1, height - 1))
|
||||
|
||||
def can_climb(self, *, from_pos: Position, to_pos: Position) -> bool:
|
||||
""" Checks if one gan walk from the elevation at from_pos to the elevation at to_pos """
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue