comparison day18.txt @ 27:6b58ddfaed38

Add Day 18 part 1 solution using line crossing
author IBBoard <dev@ibboard.co.uk>
date Tue, 02 Jan 2024 16:04:33 +0000
parents
children
comparison
equal deleted inserted replaced
26:eb6c3a7d2f72 27:6b58ddfaed38
1 --- Day 18: Lavaduct Lagoon ---
2
3 You have a set of instructions - directions, distance and hex colour
4
5 R 6 (#70c710)
6 D 5 (#0dc571)
7 L 2 (#5713f0)
8 D 2 (#d2c081)
9 R 2 (#59c680)
10 D 2 (#411b91)
11 L 5 (#8ceee2)
12 U 2 (#caa173)
13 L 1 (#1b58a2)
14 U 2 (#caa171)
15 R 2 (#7807d2)
16 U 3 (#a77fa3)
17 L 2 (#015232)
18 U 2 (#7a21e3)
19
20 This creates a trench:
21
22 #######
23 #.....#
24 ###...#
25 ..#...#
26 ..#...#
27 ###.###
28 #...#..
29 ##..###
30 .#....#
31 .######
32
33 This is 38 dug spaces. The inside can then be dug out:
34
35 #######
36 #######
37 #######
38 ..#####
39 ..#####
40 #######
41 #####..
42 #######
43 .######
44 .######
45
46 This is now 62 dug spaces.