Neighborhood logic finally right for first two rows; just the bottom row now.
Neighborhood logic fixed for the bottom row.
Fixed issue with truthiness: we specifically want undefined to determine first or last row, and not a falsy pixel value.
Added lines at the boundaries to illustrate edge behavior.
Marked out end of Tyler Nichols code, plus added periods to Tyler Nichols comments.