import pygame, sys

#General setup
pygame.init()
clock = pygame.time.Clock()

#Defining funtions (rotating pikachu NEW)
def rotate(surface,angle):
    rotated_surface = pygame.transform.rotozoom(surface, angle,1)
    rotated_rect = rotated_surface.get_rect(center = (400,400))
    return rotated_surface,rotated_rect

#Display Surface/s
screen = pygame.display.set_mode((800,800))
pikachu = pygame.image.load("W:\\12\levi.mitchell\Programming\Practice\DGT 2\Pygame Tutorials\pikachu.png")
pikachu_rect = pikachu.get_rect(center = (400,400))
angle = 0

#Loop that is always true 
while True:

    #Closing the game
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            pygame.quit()
            sys.exit()               

    #Rotating Pikachu Image (OLD)
    #pikachu = pygame.transform.rotozoom(pikachu, angle,1)
    #pikachu_rect = pikachu.get_rect(center = (400,400))
    angle += 1
    pikachu_rotated,pikachu_rotated_rect = rotate(pikachu,angle)

    #Drawing (making code into visable image)
    screen.fill((255,255,255))
    screen.blit(pikachu_rotated,pikachu_rotated_rect)

    #Misc
    pygame.display.flip()   
    clock.tick(60)