Reformatted

This commit is contained in:
ben 2022-08-02 15:44:19 -05:00
parent 4edf909ef6
commit 718ffd69ff
4 changed files with 7 additions and 11 deletions

View file

@ -34,6 +34,4 @@ class UFO(pygame.sprite.Sprite):
self.rect = self.image.get_rect(topleft=(x, int(screen_height * (80 / 600)))) self.rect = self.image.get_rect(topleft=(x, int(screen_height * (80 / 600))))
def update(self): def update(self):
pass self.rect.x += self.speed

View file

@ -36,11 +36,8 @@ class Game:
# alien lasers # alien lasers
# alien # alien
def display_lives(self): def display_lives(self):
pass pass

View file

@ -37,7 +37,6 @@ class Player(pygame.sprite.Sprite):
if self.laser_time + self.laser_cooldown <= current_time: if self.laser_time + self.laser_cooldown <= current_time:
self.ready = True self.ready = True
def horizontal_bound(self): def horizontal_bound(self):
if self.rect.left <= 0: if self.rect.left <= 0:
self.rect.left = 0 self.rect.left = 0

View file

@ -1,5 +1,7 @@
## Drone Invaders ## Drone Invaders
A *very* basic Space Invaders/Galaga style game made using turtle (and pygame, but only for sound and music). A *very* basic Space Invaders/Galaga style game made using turtle (and pygame, but only for sound and music).
Atkinson's original is posted on canvas (I think), but this is a lot cleaner code. I can't really tell if it works though, Atkinson's original is posted on canvas (I think), but this is a lot cleaner code. I can't really tell if it works
though,
because it runs *very* slowly on the school computers. because it runs *very* slowly on the school computers.