This blog post was invaluable for helping with code structure, it has a lot of good info for the correct approach. Funnily enough, I had my mechanics implemented before reading, but they ended up aligning closely (maybe more closely than I’d like for originality’s sake) with the article’s game.