4 #include "../graphics/Color.h"
5 #include "../graphics/Vector.h"
15 World(Vector<int> size);
18 Vector<int> Size() const { return size; }
21 void Update(float dt);
23 int Index(Vector<int> pos) const { return pos.x * size.y + pos.y; }
25 float MassAt(Vector<int> pos) const { return masses[Index(pos)]; }
26 void SetMass(Vector<int> pos, float m) { masses[Index(pos)] = m; }
27 Color ColorAt(Vector<int> pos) const { return colors[Index(pos)]; }
28 void SetColor(Vector<int> pos, Color c) { colors[Index(pos)] = c; }
30 Vector<float> ForceAt(Vector<float>, float m) const;
36 std::vector<float> masses;
37 std::vector<Color> colors;