Separated game logic into its own class