We look at each valid (having coordinates inside the grid) neighbor to a cell including a paper roll and then see if the neighbor contains a roll of paper or not. Finally we count the number of rolls, if it is less than 4 we can pick it. |
||
|---|---|---|
| .. | ||
| Day1.hs | ||
| Day2.hs | ||
| Day3.hs | ||
| Day4.hs | ||
| Main.hs | ||