Skip to content

Commit

Permalink
Simplify lines
Browse files Browse the repository at this point in the history
  • Loading branch information
loociano committed Dec 15, 2024
1 parent ffdd3ba commit 794c91a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions aoc2024/src/day15/python/solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ def _parse(input: Sequence[str]) -> tuple[WarehouseMap, Sequence[Position]]:
def sum_all_boxes_gps_coordinates(input: Sequence[str], double_size=False) -> int:
"""Simulates all the robot moves in the warehouse and
returns the sum of all boxes GPS coordinates at the end state."""
warehouse_map, robot_moves = _parse(input)
warehouse = DoubleWarehouse(warehouse_map, robot_moves) if double_size else Warehouse(warehouse_map, robot_moves)
warehouse = DoubleWarehouse(*_parse(input)) if double_size else Warehouse(*_parse(input))
warehouse.simulate()
return warehouse.sum_all_boxes_gps_coordinates()

0 comments on commit 794c91a

Please sign in to comment.