# Set screen dimensions #screen_width = 1000 #screen_height = 1000 # Define tile size #tile_size = 50 # Function to draw grid lines for visualization #def draw_grid(): #for line in range(0, screen_width // tile_size + 1): # Draw horizontal grid lines #pygame.draw.line(screen, (255, 255, 255), (0, line * tile_size), (screen_width, line * tile_size)) # Draw vertical grid lines #pygame.draw.line(screen, (255, 255, 255), (line * tile_size, 0), (line * tile_size, screen_height)) #draw_grid() # Draw grid