Pygame Functions
Below are the Pygame functions that have been used in this Snake game along with their descriptions.
Function | Description |
---|---|
init() | Initializes all of the imported Pygame modules (returns a tuple indicating success and failure of initializations) |
display.set_mode() | Takes a tuple or a list as its parameter to create a surface (tuple preferred) |
update() | Updates the screen |
quit() | Used to uninitialize everything |
set_caption() | Will set the caption text on the top of the display screen |
event.get() | Returns list of all events |
Surface.fill() | Will fill the surface with a solid color |
time.Clock() | Helps track time time (note capital "C" in Clock) |
font.SysFont() | Will create a Pygame font from the System font resources |
Learn more about Pygame