]> git.localhorst.tv Git - gworm.git/blobdiff - src/world/World.h
basic entities
[gworm.git] / src / world / World.h
index 4cb5a2711096f4b7be4e3361aa8d8a292616a0b3..f15d43b8ae818c0a9a6cacf51baa230b48866763 100644 (file)
@@ -1,9 +1,11 @@
 #ifndef GWORM_WORLD_H_
 #define GWORM_WORLD_H_
 
+#include "Entity.h"
 #include "../graphics/Color.h"
 #include "../graphics/Vector.h"
 
+#include <list>
 #include <vector>
 
 
@@ -27,6 +29,9 @@ public:
        Color ColorAt(Vector<int> pos) const { return colors[Index(pos)]; }
        void SetColor(Vector<int> pos, Color c) { colors[Index(pos)] = c; }
 
+       const std::list<Entity> &Entities() const { return entities; }
+       Entity &AddEntity(const Entity &);
+
        Vector<float> ForceAt(Vector<float>, float m) const;
 
 private:
@@ -36,6 +41,8 @@ private:
        std::vector<float> masses;
        std::vector<Color> colors;
 
+       std::list<Entity> entities;
+
 };
 
 }