]> git.localhorst.tv Git - space.git/blob - src/world/Universe.cpp
added autopilot that sucks
[space.git] / src / world / Universe.cpp
1 #include "Universe.h"
2
3 #include <cstring>
4 #include <memory>
5
6
7 namespace space {
8
9 Universe::Universe(Vector<int> size, Vector<int> secSize, Vector<int> areaSize)
10 : size(size)
11 , secSize(secSize)
12 , areaSize(areaSize) {
13
14 }
15
16 Universe::~Universe() {
17
18 }
19
20
21 Ship *Universe::AddShip(const Ship &s) {
22         ships.emplace_back(s);
23         return &ships.back();
24 }
25
26
27 void Universe::Update(float delta) {
28         for (Ship &s : ships) {
29                 s.Update(delta);
30         }
31 }
32
33 }