refactor and fix resetGame