# Buggy code
def update(self, x):
    """Move everything"""

    self.frame_count += 1

    if not self.game_over:
        self.all_sprites_list.update()

        for bullet in self.bullet_list:
            self.asteroid_list.use_spatial_hash = False
            asteroids_plain = arcade.check_for_collision_with_list(
                bullet, self.asteroid_list
            )
            self.asteroid_list.use_spatial_hash = True
            asteroids_spatial = arcade.check_for_collision_with_list(
                bullet, self.asteroid_list
            )
            if len(asteroids_plain) != len(asteroids_spatial):
                print("ERROR")

            asteroids = asteroids_spatial

            for asteroid in asteroids:
                self.split_asteroid(asteroid)
                asteroid.kill()
                bullet.kill()

        if not self.player_sprite.respawning:
            asteroids = arcade.check_for_collision_with_list(
                self.player_sprite, self.asteroid_list
            )
            if len(asteroids) > 0:
                if self.lives > 0:
                    self.lives -= 1
                    self.player_sprite.respawn()
                    self.split_asteroid(asteroids[0])
                    asteroids[0].kill()
                    self.ship_life_list.pop().kill()
                    print("Crash")
                else:
                    self.game_over = True
                    print("Game over")


# Traceback (TypeError)
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/srw/projects/pyarcade_lab/venv/lib/python3.7/site-packages/arcade/examples/asteroid_smasher.py", line 394, in <module>
main()
File "/home/srw/projects/pyarcade_lab/venv/lib/python3.7/site-packages/arcade/examples/asteroid_smasher.py", line 390, in main
arcade.run()
File "/home/srw/projects/pyarcade_lab/venv/lib/python3.7/site-packages/arcade/window_commands.py", line 245, in run
pyglet.app.run()
File "/home/srw/projects/pyarcade_lab/venv/lib/python3.7/site-packages/pyglet/app/__init__.py", line 142, in run
event_loop.run()
File "/home/srw/projects/pyarcade_lab/venv/lib/python3.7/site-packages/pyglet/app/base.py", line 175, in run
self._run()
File "/home/srw/projects/pyarcade_lab/venv/lib/python3.7/site-packages/pyglet/app/base.py", line 187, in _run
timeout = self.idle()
File "/home/srw/projects/pyarcade_lab/venv/lib/python3.7/site-packages/pyglet/app/base.py", line 308, in idle
redraw_all = self.clock.call_scheduled_functions(dt)
File "/home/srw/projects/pyarcade_lab/venv/lib/python3.7/site-packages/pyglet/clock.py", line 314, in call_scheduled_functions
item.func(now - item.last_ts, *item.args, **item.kwargs)
File "/home/srw/projects/pyarcade_lab/venv/lib/python3.7/site-packages/arcade/examples/asteroid_smasher.py", line 355, in update
self.all_sprites_list.update()
File "/home/srw/projects/pyarcade_lab/venv/lib/python3.7/site-packages/arcade/sprite_list.py", line 299, in update
sprite.update()
File "/home/srw/projects/pyarcade_lab/venv/lib/python3.7/site-packages/arcade/examples/asteroid_smasher.py", line 103, in update
super().update()
File "/home/srw/projects/pyarcade_lab/venv/lib/python3.7/site-packages/arcade/sprite.py", line 547, in update
self.set_position(self.center_x + self.change_x, self.center_y + self.change_y)
File "/home/srw/projects/pyarcade_lab/venv/lib/python3.7/site-packages/arcade/sprite.py", line 202, in set_position
self._set_position(self, (center_x, center_y))
TypeError: _set_position() takes 2 positional arguments but 3 were given

# Fixed code
def update(self, x):
    """Move everything"""

    self.frame_count += 1

    if not self.game_over:
        self.all_sprites_list.update()

        for bullet in self.bullet_list:
            asteroids_plain = arcade.check_for_collision_with_list(
                bullet, self.asteroid_list
            )
            asteroids_spatial = arcade.check_for_collision_with_list(
                bullet, self.asteroid_list
            )
            if len(asteroids_plain) != len(asteroids_spatial):
                print("ERROR")

            asteroids = asteroids_spatial

            for asteroid in asteroids:
                self.split_asteroid(asteroid)
                asteroid.kill()
                bullet.kill()

        if not self.player_sprite.respawning:
            asteroids = arcade.check_for_collision_with_list(
                self.player_sprite, self.asteroid_list
            )
            if len(asteroids) > 0:
                if self.lives > 0:
                    self.lives -= 1
                    self.player_sprite.respawn()
                    self.split_asteroid(asteroids[0])
                    asteroids[0].kill()
                    self.ship_life_list.pop().kill()
                    print("Crash")
                else:
                    self.game_over = True
                    print("Game over")