We will code the whole game logic, count player points, add a reset functionality and handle orientation changes, so we…