You’re totally right that a little documentation would go a long way. What is actually in grid[y][x] are the Thangs representing the walls that touch this (x, y) coordinate. In this map, there are no overlapping walls, so it’s either one wall Thang (length == 1), meaning occupied, or zero wall Thangs (length == 0), meaning unoccupied.
Hope this helps–eventually you’ll be able to hover over the variable to inspect the data structure and see any further documentation, but we don’t have that yet.