How can I combine these two segments of code so I have a game where the enemy chases the player through the maze that’s generated
I want to combine these two programs into one game but I keep getting errors when I try
main.py ”
`import pygame
import sys
Is there an option that is faster than pygame.display.update() or pygame.display.update()
def gen_maze_helper(self, x, y): if x + 1 > c.COLS or y + 1 > c.ROWS or x < 0 or y < 0 or self.maze[x][y].visited: return False else: self.maze[x][y].visited = True self.draw_maze(c.SCREEN, c.COLS, c.ROWS, False) pygame.display.flip() // i assume it is so slow because update gets called so much if ( self.gen_maze_helper(x + 1, […]