Advertisement
fevzi02

3main.py

Jan 10th, 2022
1,807
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import math
  2. import random
  3. import pygame
  4. import sys
  5. import graphicsLibrary
  6.  
  7. pygame.init()
  8. screen = pygame.display.set_mode((1080, 720))
  9. clock = pygame.time.Clock()
  10. display_width, display_height = pygame.display.Info().current_w, pygame.display.Info().current_h
  11.  
  12. x = 0
  13. y = 0
  14. i = -1
  15.  
  16. screen.fill("white")
  17.  
  18. for i in range(100):
  19.     graphicsLibrary.drawSpline(screen, "green", [670+i*10,719, 680+i*10,712, 692+i*10,701, 694+i*10,690])
  20.  
  21. graphicsLibrary.polygon(screen, "black", [(557, 397), (456, 364), (454, 322), (474, 306), (222, 123)])
  22.  
  23. graphicsLibrary.circle(screen, display_width-55, 0+50, 50, color="yellow", T_F=0)
  24. for fi in range(0, 60, 1):
  25.     x = 60*math.cos(fi)+display_width-55
  26.     y = 60*math.sin(fi)+50
  27.     graphicsLibrary.draw_line(screen, "yellow", x1=display_width-55, y1=50, x2=x, y2=y)
  28.  
  29. while True:
  30.     for event in pygame.event.get():
  31.         if event.type == pygame.QUIT:
  32.             pygame.quit()
  33.             sys.exit()
  34.         if event.type == pygame.KEYDOWN :
  35.             if event.key == pygame.K_ESCAPE:
  36.                 pygame.quit()
  37.                 sys.exit()
  38.     pygame.display.flip()
  39.     clock.tick(60)
  40.  
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement