+class ObstacleManager(object):
+ """ Manages a set of obstacles. """
+
+ def __init__(self, space, gamestate):
+ self._space = space
+ self._obstacles = [
+ BaseObstacle.load(cfg) for cfg in gamestate.station["obstacles"]]
+ for obs in self._obstacles:
+ obs.add(self._space)
+
+ def render(self, surface):
+ for obs in self._obstacles:
+ obs.render(surface)
+
+