Conditions | 2 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | from random import randrange |
||
23 | def move(self, game): |
||
24 | if self.rect.x < -500: |
||
25 | self.rect.x = self.rect.x = max( |
||
26 | platform.rect.x for platform in game.platforms |
||
27 | ) + randrange(600, 1000) |
||
28 | |||
29 | self.rect.y = randrange(400, 620) |
||
30 | self.initial_y = self.rect.y |
||
31 | |||
32 | else: |
||
33 | self.rect.x -= int(game.player.ax) |
||
34 | |||
68 |