def _gen_grid(self, width, height):
    self.grid = Grid(width, height)
    self.grid.horz_wall(self.world, 0, 0)
    self.grid.horz_wall(self.world, 0, (height - 1))
    self.grid.vert_wall(self.world, 0, 0)
    self.grid.vert_wall(self.world, (width - 1), 0)
    for (number, index, reward) in zip(self.num_balls, self.balls_index, self.balls_reward):
        for i in range(number):
            self.place_obj(Ball(self.world, index, reward))
    for a in self.agents:
        self.place_agent(a)
def _gen_grid(self, width, height):
    self.grid = Grid(width, height)
    self.grid.horz_wall(self.world, 0, 0)
    self.grid.horz_wall(self.world, 0, (height - 1))
    self.grid.vert_wall(self.world, 0, 0)
    self.grid.vert_wall(self.world, (width - 1), 0)
    for (number, index, reward) in zip(self.num_balls, self.balls_index, self.balls_reward):
        for i in range(number):
            self.place_obj(Ball(self.world, index, reward))
    for a in self.agents:
        self.place_agent(a)