Advertisement
jabela

9 Roadblock 1A

Dec 20th, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import pygame
  2. #Need to now import Random
  3. import random
  4. pygame.init()
  5.  
  6. #General Variables
  7. running = True
  8. window = pygame.display.set_mode((400,600))
  9. clock = pygame.time.Clock()
  10.  
  11. #New Variables
  12. randx = random.randrange(0, 300)
  13. randy = 0
  14. score = 0
  15.  
  16. pygame.display.set_caption('Race car')
  17.  
  18. class car(pygame.sprite.Sprite):
  19.     def __init__(self,location):
  20.         pygame.sprite.Sprite.__init__(self)
  21.         self.image = pygame.image.load('racecar.png').convert_alpha()
  22.         self.x_change = 0
  23.         self.x = 370
  24.         self.y = 430
  25.  
  26. car1 = car([370,430])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement