Closed scan-lan closed 2 years ago
I've got a follow-up PR (#8) which adds type hints. You can merge that after this one, if you like. I think adding them helped me understand/adapt the code a bit quicker.
Thanks and sorry for the delay merging! Looks great.
No worries, it was my pleasure.
Addresses issue #6
Hiya, Robert,
Love your blog, I came across it whilst looking for wave function collapse stuff. Your post about it is the first result on google when you search "wave function collapse algorithm"—for me, at least— and so I think it'd be good to ensure the code is as clear as possible.
In a few places, matrices were indexed like
[x][y]
, but in other places the inner-lists were referred to as rows.This treats the inner lists in the matrices as rows, which is more common than the current implementation. This means all indices are changed to
[y (row)][x (coefficient/value)]
. I tried to touch the code as little as possible besides that.Thanks for the code, the post, and the blog in general, Luke