From acd16970bc93712e7c8c3996816242a04999818b Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 6 Mar 2021 18:53:22 +0000 Subject: Introduce the Train concept as a literal collection of rail vehicles --- application/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'application/main.cpp') 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(l3); + const auto & train = world.create(l3); + auto b47 = std::make_shared("brush47"); for (int n = 0; n < 6; n++) { - loco->wagons.push_back(world.create(l3)); + train->create(b47); } } -- cgit v1.2.3