Refactored out the main_loop so that it's not tightly coupled inside builder, and in the process found I was accidentally copying GUI and GameEngine because Builder wasn't using a &ref for them. Now they don't have a copy constructor to catch that.
This commit is contained in:
parent
a7c5de6ac3
commit
fff182b457
7 changed files with 27 additions and 34 deletions
|
@ -1,4 +1,5 @@
|
|||
#include "builder.hpp"
|
||||
#include "gui.hpp"
|
||||
#include <fmt/core.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
@ -7,7 +8,7 @@ int main(int argc, char *argv[])
|
|||
GameEngine game{100};
|
||||
|
||||
auto builder = Builder(gui, game);
|
||||
builder.run();
|
||||
gui.main_loop(game, builder);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue