There’s the possibility of painting yourself into a corner (generating an inconsistent board) if you do it on the fly. It could be done, but it’s probably just simpler to generate it at the outset and then do lookups.
edit: unless you just meant that the adjacency numbers could be generated on the fly, in which case painting yourself into a corner isn’t a concern
edit: unless you just meant that the adjacency numbers could be generated on the fly, in which case painting yourself into a corner isn’t a concern