ah wow.. cool! :-)
you don't have that code published anywhere, by any chance?
I don't, but it's not suuuper complicated to write (a fun practice exercise even if you're not actually using it for anything!) - at this type of resolution it's fine to just bruteforce the whole thing. It's also a pretty popular trick, so you can probably find some good examples if you hunt around online