Game tech is basically universal for zero-graphics games like this, it's 100% "business logic". If you have to fight with the UI/display system for even a moment to make a game like this, then you're probably either using a library without enough features (which, ahem...Pygame, yeah...) or you just don't know the system well enough to be efficient.