brick enumeration: out of bounds check
simplified BrickCell generation code