title: Creating a maze in Python/Pygame but not sure how to make walls
body: <pre><code>import pygame, sys
  from pygame.locals import *
  
  pygame.init()
  
  windowwidth = 600
  windowheight = 800
  WALLWIDTH = 30
  WALLHEIGHT = 30
  PLAYERWIDTH = 20
  PLAYERHEIGHT = 20
  
  
  BLACK = (0, 0, 0)
  WHITE = (255, 255, 255)
  RED = (255, 0, 0)
  LIMEGREEN = (50, 205, 50)
  
  running = True
  while running == True:
      for event in pygame.event.get():
          if event.type == QUIT:
              running = False
          if event.type == KEYDOWN:
              if (event.key == K_UP or event.key == K_w):
              elif (event.key == K_DOWN or event.key == K_s):
              elif (event.key == K_LEFT or event.key == K_a):
              elif (event.key == K_RIGHT or event.key == K_d):
  
  thescreen = pygame.display.set_mode((windowwidth, windowheight))
  pygame.display.set_caption('Maze Game')
  mainclock = pygame.time.Clock()
  
  player1 = pygame.draw.rect(thescreen, LIMEGREEN, (50, 50, PLAYERWIDTH, PLAYERHEIGHT))
  </code></pre>
  
  <p>I am trying to create a maze game (not generator) for a project in school using Python/Pygame. I have looked all over for a way to create walls and make a player (just a green rect) collide with these walls, and how to make several levels for this. How would I make levels, how would I create walls, and how would I detect collision between player and walls?</p>