5 #include "../graphics/Color.h"
6 #include "../graphics/Vector.h"
17 World(Vector<int> size);
20 Vector<int> Size() const { return size; }
23 void Update(float dt);
25 int Index(Vector<int> pos) const { return pos.x * size.y + pos.y; }
27 float MassAt(Vector<int> pos) const { return masses[Index(pos)]; }
28 void SetMass(Vector<int> pos, float m) { masses[Index(pos)] = m; }
29 Color ColorAt(Vector<int> pos) const { return colors[Index(pos)]; }
30 void SetColor(Vector<int> pos, Color c) { colors[Index(pos)] = c; }
32 const std::list<Entity> &Entities() const { return entities; }
33 Entity &AddEntity(const Entity &);
35 Vector<float> ForceAt(Vector<float>, float m) const;
41 std::vector<float> masses;
42 std::vector<Color> colors;
44 std::list<Entity> entities;