Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Ship():
- def __init__(self, screen):
- """Initialize the ship and set its starting position."""
- self.screen = screen
- self.image = pygame.image.load('images/ship.bmp')
- self.rect = self.image.get_rect()
- self.screen_rect = screen.get_rect()
- self.rect.centerx = self.screen_rect.centerx
- self.rect.bottom = self.screen_rect.bottom
- def blitme(self):
- """Draw the ship at its current location."""
- self.screen.blit(self.image, self.rect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement