Copyright | (c) Eric Mertens 2018 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
https://adventofcode.com/2018/day/20
This solution relies on the generated maze starting from the origin. Each door will be located at coordinates where one component of the coordinate is odd and the other is even. Rooms will be located at coordinates where both components are even. Coordinates where both components are odd will always be walls.
- - + 54321012345 5########### - 4.|. 3#- 2. ^ 1###-# | 0..# v 1-#### 2.|.|.|.# 3## + 4.|.# 5###########