I am trying to create a game from a book by Eric Matthes and I am getting a error for some reason I am getting the syntax error before this it was a indenation error. Let me know if you guys can help me in this, thanks.
import sys
import pygame
def check_events(ship):
"""Respond to keypresses and mouse events."""
for event in pygame.event.get():
if event.type == pygame.QUIT:
sys.exit()
elif event.type == pygame.KEYDOWN:
if event.key == pygame.K_RIGHT:
# Move the ship to the right.