diff --git a/16.1.ts b/16.1.ts new file mode 100644 index 0000000..ebc1adc --- /dev/null +++ b/16.1.ts @@ -0,0 +1,9 @@ +import { open } from 'node:fs/promises'; + +const file = await open('./inputs/16'); + +let input = (await file.readFile()).toString().split('\n') + +function ray(position: { x: number, y: number }, direction: { x: number, y: number }) { + +} \ No newline at end of file diff --git a/inputs/16 b/inputs/16 new file mode 100644 index 0000000..824f187 --- /dev/null +++ b/inputs/16 @@ -0,0 +1,110 @@ +\.................-....-.-.|....................|......./.|.\................|...........|....--.............. +............-...................|.............|..-.......-/..............-....\............................... +|.......//...........................................|...............-......../.....\....................\.... +....|......-.-.............-......\.....\......../..................../....................................... +..\..\../................../.............-............|....-.........................|......|...............|. +-..|........................./.................\.........\./.............\..|..-...-.............\............ +.\......||-..................../................-................./....|........................|............. +..............\./...........-.........../-................-.........\...\........../-.......|................. +....-..........-.-.....\......................../.......-..........-/.....................||................|. +./..........|/............................\./............................./....../........\...-|............\- +........\.............................-...../............---...........|...............|......\\.............. +........//....|.\......./...\.............|..............\............./...........-.|..-.............|....... +...................\...........-/..-......\...|........-.|................\-.......|........\................. +|.|....../|............\./..-........\..............................-.....................|....../............ +............-....................-..............-..-................|.//.............-.............-.......... +..........-.......-......|-................./........../...\........-.......................-..\.......\...... +................../....|............-....../................./.....................|.................-........ +...\..............--..|.....||.....\.............\../................................................-.-...../ +.........-......|....-.................-.......\-................./..|...................|\.....\.....|.|-.... +......................-......................-............/....................\...../...\..../............... +...../......-...............\...-....|......../.........\................................|.........../........ +........../.......\..............-...............\........-|....-......-.............|...........|........./.. +./...............\....../....../..../...................................................|.....|.|../......./.. +....|\........\-...../...................-.............\.\..................................././..........\... +....................................-..../......................-..///......-...|.|..........................| +.........-\.....-...........|........./..........-..\.....\./...................-........................-.... +....../.......././......--.....|.\..-...-....\..........................-....-...-..|.|.....|.......\-./...... +...-....................-................|.............-../........|../........-.............|\............... +...../...........-......../................|................|.....\.....-.............../...|....../\......... +./...\.....\..-./.........................|................................-....................-............. +.............\|.../....\\.....\..|...........\.....................|......|.|.....|.....-............\.\...... +........................|......-..........-.../......-........|...../.\|...-................................|. +.......\...-...\..........|.....\...................\.........|..........-/.........\...................../... +.-|.......|............./..|./....-.../...\............-......../..............-.......//...-...........||.\.. +..|..\./..-........\..|....-..\.........../..............................|..\..................../..|...../-.. +.|.........-.\...........................\..../......./....||............\..........|............-.\|......... +....................\..../|............................\.../..|........./...../............||........\....../. +....................../.....|...................|......|.................|..|.......|................|........ +.....................\.........-..../.........../../..-......\.................|.../....................../... +........\.-................/........\...../....../.|.\...|/../..........................................-..... +....................................|......./...../............-................-/..|.-....................\.. +..|.........................-....................../...|.....|.............../.........../.....|\............. +.......................................|.\.|.......................-.......|..............\............-./.... +..........//................\..|./................-.................-..../../|................................ +.|......................................./............/..-.......-.|.........................\|..|............ +............................/.-..................-./..../..............|-.........-|.......................... +.................-...|................\.........|\...............................\...........\...//........... +........\..|.|--.............|.......\.................|......|\./.........................\.|................ +.-|.............|\|.....\|././...|..\.............\..\...................\...........\...../.................. +..../..............-..|...|.........-.........\.....-...........-.....|...\.-....-../.................\....... +........\.|........\\.........-...............-.......-..................................../..........|....... +...............-...................\/...............\..-\...........|.-........-.\-.....\....\..../......-.... +.../-......./..............|.......|..//......-....................../.|....\......|..\.........../-\......... +.-....|./....-.../....../.....-..............\..-..\..-............\................|...|..........-.......|.. +|......../...................\..../....\......./..|.................\...............\.........\../.|......../. +../............/........|..|.......................................\../\...............\............/.......\. +........-.-...\........../.......-....-............./.............-......./................\..........-....... +.../-................/......|/........-......|..........|..-..............|/..........................-....... +......./............../...................|../...../................./../..........\../.....\....\............ +..............-..|../-........................|...\.../...-/..........\.......\......\.................-....-. +......................................-/.\........................../......-..\..\........\...............|..\ +.............-.........../-|........-........\....-.....\....../..\........................\......|.......\... +.././....................|\.../\.........\.|.............../..../...|......./.\...|.......\.........|......... +......................./........./-./...........................|/...\........-.../.................||........ +..............|./........\..............\.............................|/................../............|.-..|. +.........................-......../........./.....|....-..-.-..............-.-......../.......\...\./......... +.-............../../....\//......../...|......|......\..................-......\.....-....\|.........|........ +..............-.....................\.................\.|...-............................|......\............. +\\.....|...........\............|............................../............................................\. +.-........../|...\..............-...............................\...........\.....|......\..........\......... +.\............\.|....-........./....../../.....-..\........|...............-..................|............-.| +.....\......-.........-.........|....../..-....|.....\..../....|........-..................................... +..........\-..-..../\.....................\.........-...........|..../-.......................\....-.......... +...../............./..|..................../............../../.........|...............-../................... +.....|...../.....|......-.............................|...........-......................./............/...... +.....................||./.-.................-.........\.\..................-..............\...--.........\.... +.|......-......-.\.......-......\....\..\..|.........../......./.....................-..........|............. +.....\.....\............................--..................|..-........\....\...\.|.\.-...........\...\...... +./...........\.......\/......|........./..|................\-................/....\...................\.\..... +..|...............................-.........-.|/......|.....|........\........................................ +.......|............-............../............-......../..-...\|-...-..../...........-..........-..-/....... +............................-..\.......................................-.........................\..........-. +........................\.........|................||...-....\......\.....\.................\...\\....../..... +....\../.....-.......-.................-|...................-../.|-............|........-|......./../...\..... +..................................................\.......|......./..\./......../....|....-|.-................ +....../.........|.......|...|.......\.../|...............-.......-\..\......././..................|..\.|...../ +............|.....\...........-.............................../.....-.................-.../............/.../.. +...../.......\............................|.....\....\................/..................\......../........... +..................-....\.........\|................/|......../.-................|...\......................--. +......-..-.....................................-\.........|.../.....................|..|.-.....\...|....\....- +......-......-.................-......|..................................................|.................... +..\...............|......../........-......./.............../...........-..........|/.....///\.....-.......... +.........../..|.............../..........\|.........................\...|.....\||....\...|.|/.....-....../.... +...../...../.....-............................................|........|............|......................... +......-../\................../..............\............\.................../|...........|.............\..... +...........-..........................-....\..\..|.-..............................................\........|.. +/.--..//....\...............................-............|..././.............................................. +/...............|.........../..../......................\.....|............|...........|...................-.. +..-................\../|......../...................../...........\..|.|\../.................................. +....|...../.....-......\.........................-.....//...............|.........-.......|...-....--......... +....|..\.-..../....................|..........\............./...........\.../................................. +............................\...................................../.......................|...........\....... +.........../.....-.....................\..\.-..|............-...............\.........................-....... +......-.......-\.\......\..-.-........./...........\..........|........................\.....-.....\.......... +..............-....../.-............./........../..............\-....-.../...../.-............\......./.-..... +......|...................................................||..../...|\.....................-.../...\........|. +......|.//........................-...../...........-..\...|......|..................../........../........... +.....................................................|.........//...........|\.....\....................|.../. +............-..||...........|....../....................\...\................................../.......|...... +..\....\......./-\.\...........-\................|.........../................||.../.....-...........\........