Commit e7a60632 authored by Peter Fidelman's avatar Peter Fidelman
Browse files

Add extra commentary

parent a1a3a78d
......@@ -50,6 +50,8 @@ As each number is called (via `call-number`), I obliterate any matches on each b
In part B, any winners are wiped out (overwritten with all 127's) which ensures they will never match any successive calls, effectively taking them out of the running. I keep track of the total count of winners, and once it equals the total number of bingo boards I know I've found the last winner and can report the result.
Bear in mind that `call-number` doesn't have a bounds-check. This is sort of by design. If we are given a malformed input where no board wins, we will happily run off the end of the list of "calls" and start calling numbers straight off the first board until the first board wins. Simple enough.
# Day 5
Instead of playing with sparse representations, I took the coward's way out with a 1000*1000 array of zero-initialized bytes. This was too big to fit in pforth's dictionary space, so I used [ALLOCATE]( This makes me itch a bit because it's way too big to fit in the memory space of classical Forth systems, and I'm sure there's a more efficient way of solving this.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment