diff --git a/GraphicsSystem.h b/GraphicsSystem.h deleted file mode 100644 index 83ea55f..0000000 --- a/GraphicsSystem.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef GRAPHICSSYSTEM_H -#define GRAPHICSSYSTEM_H - -#include - -#include "GraphicsObject.h" - -class GraphicsSystem -{ -public: - void AddObject(GraphicsObject *obj) - { - objects.push_back(obj); - } - -//private: - std::vector objects; -}; - -#endif diff --git a/main.cpp b/main.cpp index 868523f..7f34582 100644 --- a/main.cpp +++ b/main.cpp @@ -1,22 +1,21 @@ #include - -#include "GraphicsSystem.h" +#include #include "GraphicsObject.h" #include "Ball.h" int main(int argc, char *argv[]) { - GraphicsSystem system; + std::vector objects; GraphicsObject graphics_obj(7); - system.AddObject(&graphics_obj); + objects.push_back(&graphics_obj); Ball ball1; - system.AddObject(&ball1); + objects.push_back(&ball1); Ball ball2; - system.AddObject(&ball2); + objects.push_back(&ball2); - for(auto obj : system.objects) + for(auto obj : objects) for(auto i = 0; i < 5; ++i) std::cout << obj->X() << std::endl; }