while running:
screen.fill((255,255,255))
screen.blit(background,(0,0))
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
# keystroke controlling i am not getting this print message
if event.type == pygame.KEYDOWN:
if event.type == pygame.K_SPACE:
print("space is pressed ")
if event.type == pygame.KEYUP:
if event.type == pygame.K_SPACE:
print("released")
playerx += playerx_change
player(playerx , playery)
cactus(cactusx , cactusy)
pygame.display.update()
game()