summaryrefslogtreecommitdiff
path: root/application/main.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-03-06 18:53:22 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-03-06 18:53:22 +0000
commitacd16970bc93712e7c8c3996816242a04999818b (patch)
tree24dbc35c1fde12a3d429539bf24605b738f4bef9 /application/main.cpp
parentGive collection a virtual desctructor (diff)
downloadilt-acd16970bc93712e7c8c3996816242a04999818b.tar.bz2
ilt-acd16970bc93712e7c8c3996816242a04999818b.tar.xz
ilt-acd16970bc93712e7c8c3996816242a04999818b.zip
Introduce the Train concept as a literal collection of rail vehicles
Diffstat (limited to 'application/main.cpp')
-rw-r--r--application/main.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/application/main.cpp b/application/main.cpp
index 8257a79..4d5cb7f 100644
--- a/application/main.cpp
+++ b/application/main.cpp
@@ -79,9 +79,10 @@ public:
rl->addLinksBetween(e1, j);
auto e2 = rl->addLinksBetween(e, {-925, 10, -1075})->ends[0].first->pos;
rl->addLinksBetween(e2, j);
- auto loco = world.create<Brush47>(l3);
+ const auto & train = world.create<Train>(l3);
+ auto b47 = std::make_shared<RailVehicleClass>("brush47");
for (int n = 0; n < 6; n++) {
- loco->wagons.push_back(world.create<Brush47Wagon>(l3));
+ train->create<RailVehicle>(b47);
}
}