text: //
  // WorldManager.h
  // Joseph Petitti
  //
  
  #ifndef __WORLD_MANAGER_H__
  #define __WORLD_MANAGER_H__
  
  #include "Manager.h"
  #include "ObjectList.h"
  
  // two-letter acronym for easier access to manager
  #define WM df::WorldManager::getInstance()
  
  namespace df {
  
  // number of layers
  const int MAX_ALTITUDE = 4;
  
  class WorldManager : public Manager {
    private:
      WorldManager();                      // private b/c this is a singleton
      WorldManager(WorldManager const&);   // don't allow copying
      void operator=(WorldManager const&); // don't allow assignment
      ObjectList m_updates;   // all Objects in the world to update
      ObjectList m_deletions; // all Objects in the world to delete
  
      public:
        // get the singleton instance of this WorldManager
        static WorldManager &getInstance();
  
        // start up game world (initialize everything to empty). Returns 0
        int startUp();
  
        // shut down the game world (delete all game world Objects)
        void shutDown();
  
        // insert Object into world. Return 0 if successful, else -1
        int insertObject(Object *p_o);
  
        // remove Object from the world. Return 0 if successful, else -1
        int removeObject(Object *p_o);
  
        // return list of all Objects in the world
        ObjectList getAllObjects() const;
  
        // return list of all Objects in the world matching a particular type
        ObjectList objectsOfType(std::string type) const;
  
        // update world, and delete Objects marked for deletion
        void update();
  
        // makrs an object for deletion in the next update
        int markForDelete(Object *p_o);
  
        // draw all objects
        void draw();
  
        // return list of Objects collided with at position 'where'
        // collisions only with solid objects
        // does not consider whether p_o is solid or not
        ObjectList getCollisions(Object *p_o, Vector where) const;
  
        // move object
        // if collision with solid, send collision events
        // if no collision with solid, move oka
        // return 0 if okay, -1 if collision with solid
        int moveObject(Object *p_o, Vector where);
  };
  
  } // end namespace df
  
  #endif
  