add pretty printed tower test in day 17
This commit is contained in:
parent
950f2860df
commit
46d49dc3fe
29
src/day17.ml
29
src/day17.ml
|
|
@ -170,3 +170,32 @@ let%expect_test "Day 17.2" =
|
||||||
Printf.printf "height: %i\n" @@ solve 1_000_000_000_000 (Utils.lines_of_input 17);
|
Printf.printf "height: %i\n" @@ solve 1_000_000_000_000 (Utils.lines_of_input 17);
|
||||||
[%expect {| height: 1597714285698 |}]
|
[%expect {| height: 1597714285698 |}]
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
let%expect_test "Smol tower" =
|
||||||
|
let stream =
|
||||||
|
example_lines |> List.hd |> Iter.of_str |> Iter.map dir_of_char |> Iter.to_array
|
||||||
|
in
|
||||||
|
let cave = init_cave 18 8 in
|
||||||
|
drop_shapes cave stream;
|
||||||
|
Printf.printf "%s" @@ draw_cave cave;
|
||||||
|
[%expect
|
||||||
|
{|
|
||||||
|
.......
|
||||||
|
.......
|
||||||
|
.......
|
||||||
|
.....#.
|
||||||
|
.....#.
|
||||||
|
..####.
|
||||||
|
.###...
|
||||||
|
..#....
|
||||||
|
.####..
|
||||||
|
....##.
|
||||||
|
....##.
|
||||||
|
....#..
|
||||||
|
..#.#..
|
||||||
|
..#.#..
|
||||||
|
#####..
|
||||||
|
..###..
|
||||||
|
...#...
|
||||||
|
..####. |}]
|
||||||
|
;;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user