Split up core game and drawing logic