Thanks for the comment! The code is a real mess, but it basically follows the algo on the game page. I'll definitely consider writing a more detailed breakdown at some point though~