Day20
Copyright(c) Eric Mertens 2021
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellNone
LanguageHaskell2010

Main

Description

https://adventofcode.com/2021/day/20

This problem has us implement a cellular automaton on an infinite grid. The problem requires special treatment so that we can represent updates to infinite space.

Synopsis

Documentation

data Picture Source #

Pictures have the boolean value at all coordinates with the exception of those listed in the set.

Constructors

Picture 

Fields

main :: IO () Source #

>>> :main
5179
16112

step :: IntSet -> Picture -> Picture Source #

Apply the given image enhancement algorithm to a picture

cell :: Coord -> [Coord] Source #

3x3 neighborhood around a coordinate