Raw game logic before refactoring