Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ball_is_stopped = False
- stops = 0
- if abs(tennisball.speedx) < epsilonComp and abs(tennisball.speedy) < epsilonComp:
- ball_is_stopped = True
- if ball_is_stopped:
- stops += 1
- if stops == 2:
- score = 15
- if stops == 3:
- score = 30
- scorebox = font.render(str(score), True, WHITE, BLACK)
- scoreRect = scorebox.get_rect()
- scoreRect.center = (625, 50)
- screen.blit(scorebox, scoreRect)
- for event in pygame.event.get():
- if event.type == pygame.QUIT:
- carryOn = False
- elif event.type == pygame.KEYDOWN:
- if event.key == pygame.K_x:
- carryOn = False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement