Advertisement
Guest User

Untitled

a guest
Jun 24th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. class Ship():
  2. def __init__(self, screen):
  3. """Initialize the ship and set its starting position."""
  4. self.screen = screen
  5. self.image = pygame.image.load('images/ship.bmp')
  6. self.rect = self.image.get_rect()
  7. self.screen_rect = screen.get_rect()
  8. self.rect.centerx = self.screen_rect.centerx
  9. self.rect.bottom = self.screen_rect.bottom
  10. def blitme(self):
  11. """Draw the ship at its current location."""
  12. self.screen.blit(self.image, self.rect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement