-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
59 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from typing import TYPE_CHECKING | ||
|
||
from day16.day16 import INPUT_SMALL | ||
from day16.lib.direction import Direction | ||
from day16.lib.laser import Laser | ||
from day16.lib.parsers import get_input | ||
|
||
if TYPE_CHECKING: | ||
from day16.lib.world import SolvedWorld, World | ||
|
||
|
||
def test_world() -> None: | ||
world: World = get_input(INPUT_SMALL) | ||
start_laser: Laser = Laser(0, 0, Direction.EAST) | ||
solved_world: SolvedWorld = world.solve(start_laser) | ||
|
||
print(solved_world) | ||
assert str(solved_world) == "\n".join( | ||
[ | ||
"1211110000", | ||
"0100010000", | ||
"0100011111", | ||
"0100011000", | ||
"0100011000", | ||
"0100011000", | ||
"0100122100", | ||
"1211111100", | ||
"0111121100", | ||
"0100010100", | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters