def step(self, dt):
        dt /= 1000.0

        self.ticks += 1
        self.screen.fill(self.BG_COLOR)
        self._handle_player_events()
        self.score += self.rewards["tick"]

        hit = pygame.sprite.collide_rect(self.player.head, self.food)
        if hit: #it hit
            self.score += self.rewards["positive"]
            self.player.grow()
            self.food.new_position(self.player)

        hits = pygame.sprite.spritecollide(self.player.head, self.player.body_group, False)
        if len(hits) > 0:
            self.lives = -1

        x_check = (self.player.head.pos.x < 0) or (self.player.head.pos.x+self.player_width/2 > self.width)
        y_check = (self.player.head.pos.y < 0) or (self.player.head.pos.y+self.player_width/2 > self.height)
        
        if x_check or y_check:
            self.lives = -1

        if self.lives <= 0.0:
            self.score += self.rewards["loss"]

        self.player.update(dt)

        self.player.draw(self.screen)
        self.food.draw(self.screen)
Delete queries can safely contain sliced subqueries
dataset/ETHPy150Open ntasfi/PyGame-Learning-Environment/ple/games/snake.py/Snake.step--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/tests/regressiontests/queries/tests.py/SubqueryTests.test_sliced_delete