init() (returns a tuple indicating success and failure of initializations) Takes a tuple or a list as its display.set_mode() parameter to create a surface (tuple preferred) update() Updates the screen Used to uninitialize quit() everything Will set the caption text on set_caption() the top of the display screen event.get() Returns list of all events Will fill the surface with a Surface.fill() solid color time.Clock() Helps track time time Will create a Pygame font font.SysFont() from the System font resources Files used : Pygame.image is a cross-platform set of Python modules designed for writing video games. It includes computer graphics and sound libraries designed to be used with the Python programming language. Used to import apple and snake in the program. To achieve this we,
Create a display surface object using display.set_mode()
method of pygame. Create a Image surface object i.e.surface object in which image is drawn on it, using image.load() method of pygame. Copy the image surface object to the display surface object using blit() method of pygame display surface object. Show the display surface object on the pygame window using display.update() method of pygame. start