Classwork:
Open pygameHelloWorld.py program and save it as Maze1_YI.py. Use what you learned in this program, rectangles, lines and text to draw a simple maze. Include the “Start” and “End” signs on the maze to indicate the beginning and end of the maze. Have a colorful but yet light background.
Open pygameHelloWorld.py program and save it as Maze2_YI.py. Use what you learned in this program, circles, lines, and text to draw a simple circular maze. Include the “Start” and “End” signs on the maze to indicate the beginning and end of the maze. Have a colorful but yet light background.
Warning!
Work on an easy maze like the one below
Resources:
For the second maze you will need to know how to draw arcs.
Simple Example: Here is the code for a quarter of a green circle with radius 100
import math
pygame.draw.rect(windowSurface,RED,(50,50,100,100),5) pygame.draw.arc(windowSurface, GREEN, (50,50,100,100),math.radians(0), math.radians(90),10)
You can also draw the blue one:
Can you guess the code for the blue arc in the bottom rectangle?
Explain what each parameter represents. Be concise and give different examples