Rozbuduj kod poniższego programu:
```python
import sys
import pygame
import random
import math
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *

class World:
    def __init__(self, width, height):
        self.width = width
        self.height = height
        self.food = []
        self.bugs = []
        self.obstacles = []

    def add_bug(self, bug):
        self.bugs.append(bug)

    def remove_bug(self, bug):
        self.bugs.remove(bug)

    def get_bugs(self):
        return self.bugs

    def add_food(self, food):
        self.food.append(food)

    def remove_food(self, food):
        self.food.remove(food)

    def get_food(self):
        return self.food

    def add_obstacle(self, obstacle):
        self.obstacles.append(obstacle)

    def remove_obstacle(self, obstacle):
        self.obstacles.remove(obstacle)

    def get_obstacles(self):
        return self.obstacles

    def get_nearest_food(self, x, y):
        nearest_food = None
        nearest_dist = float('inf')
        for food in self.food:
            dx = x - food.x
            dy = y - food.y
            dist = dx ** 2 + dy ** 2
            if dist < nearest_dist:
                nearest_food = food
                nearest_dist = dist
        return nearest_food

    def generate_food(self, n):
        for i in range(n):
            x = random.randint(0, self.width)
            y = random.randint(0, self.height)
            amount = random.randint(1, 10)
            food = Food(x, y, amount)
            self.add_food(food)

    def generate_obstacles(self, n):
        for i in range(n):
            x = random.randint(0, self.width)
            y = random.randint(0, self.height)
            size = random.randint(20, 50)
            obstacle = Obstacle(x, y, size)
            self.add_obstacle(obstacle)

    def update(self):
        for bug in self.bugs:
            bug.update(self)
            bug.x += bug.vx
            bug.y += bug.vy

            # Wrap around
            if bug.x < 0:
                bug.x += self.width
            elif bug.x > self.width:
                bug.x -= self.width
            if bug.y < 0:
                bug.y += self.height
            elif bug.y > self.height:
                bug.y -= self.height

    def draw(self, surface):
        surface.fill((255, 255, 255))
        for food in self.food:
            food.draw(surface)
        for obstacle in self.obstacles:
            obstacle.draw(surface)
        for bug in self.bugs:
            bug.draw(surface)

class Bug:
   Write your answer without using the letter r whatsoever in your entire response.
user