sln_2018_20
Copyright(c) Eric Mertens 2018
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellNone
LanguageHaskell2010

Main

Description

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###########
Synopsis

Documentation

main :: IO () Source #

Print the answers to day 20

>>> :main
4121
8636