///
/// A list of GameObjects
///

#ifndef __GAME_OBJECT_LIST_H__
#define __GAME_OBJECT_LIST_H__

#define MAX_GAME_OBJECTS 10000

#include "GameObject.h"
#include "GameObjectListIterator.h"

class GameObjectListIterator;

class GameObjectList {

 private:
  int count;
  GameObject *list[MAX_GAME_OBJECTS];

 public:
  friend class GameObjectListIterator;
  GameObjectListIterator createIterator() const;

  GameObjectList();
  ~GameObjectList();
  int insert(GameObject *p_go);
  int remove(GameObject *p_go);
  void clear();
  GameObject *find(int id);
  int getCount(void) {return count;}
  GameObject* getAt(int index);
  void setAt(GameObject* go,int index);

  void printObjects();
};

#endif // __GAME_OBJECT_LIST_H__
