Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pygame
- import random
- #Настройки окна
- WIDTH = 500
- HEIGHT = 500
- FPS = 60
- # Цвета
- YELLOW = (255, 255, 0)
- SKY = (133, 193, 233)
- GREEN = (46, 204, 113)
- WHITE = (255, 255, 255)
- #Инициализация
- pygame.init()
- screen = pygame.display.set_mode((WIDTH,HEIGHT))
- clock = pygame.time.Clock()
- bird_img = pygame.image.load('fpbs1.png').convert()
- bird_rect = bird_img.get_rect()
- bw = bird_rect.width
- bh = bird_rect.height
- bird = pygame.Rect(40, 40, bw, bh)
- points = 0
- font = pygame.font.SysFont('comic sans ms', 30)
- game_over_font = pygame.font.SysFont('comic sans ms', 50)
- game_over_text = game_over_font.render('GAME OVER', 1, WHITE)
- running = True
- while running:
- screen.fill(SKY)
- for i in pygame.event.get():
- if i.type == pygame.QUIT:
- running = False
- clock.tick(FPS)
- pygame.display.update()
- pygame.quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement