This is my first real code project. I am trying to create a Crash gambling project for a math project at School.
My current problem is that when I flip my arc it draws 2 separate arcs. I don't know why it does this but if anyone can help it would be much appreciated.
Here is my code:
import pygame
from math import sin, cos, radians
grid = pygame.image.load('grid3.jpg')
wn = pygame.display.set_mode((600, 600))
wn2 = pygame.display.set_mode((600, 600))
clock = pygame.time.Clock()
r = 600
a = 0
b = 0
def x_y(r, i, a, b):
return (int(r * cos(radians(i)) + a), int(r * sin(radians(i)) + b))
for i in range(0, 90, 1):
clock.tick(30)
pygame.draw.line(wn, (255, 255, 255), x_y(r, i, a, b), x_y(r, i+1, a, b), 10)
wn2.blit(wn, (0,0))
wn.blit(grid,(0,0))
wn2.blit(pygame.transform.rotate(wn2, -90), (0, 0))
wn = pygame.transform.flip(wn2, True, False)
pygame.display.update()