diff --git a/meson.build b/meson.build index c7164df..eadf9bd 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,8 @@ project('2048', 'cpp', - default_options : ['cpp_std=c++14', 'warning_level=2']) + default_options : ['cpp_std=c++17', 'warning_level=2']) main_target_name = '2048' + sources = ['src/2048.cpp', 'src/gameboard.cpp', 'src/gameboard-graphics.cpp', 'src/game.cpp', 'src/game-input.cpp', 'src/game-graphics.cpp', 'src/game-pregamemenu.cpp', 'src/global.cpp', 'src/loadresource.cpp', 'src/menu.cpp', 'src/menu-graphics.cpp', 'src/saveresource.cpp', 'src/scores.cpp', 'src/scores-graphics.cpp', 'src/statistics.cpp', 'src/statistics-graphics.cpp', 'src/tile.cpp', 'src/tile-graphics.cpp'] hdrs = include_directories('src/headers') diff --git a/src/game.cpp b/src/game.cpp index 7206e61..3cdc979 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -463,10 +463,11 @@ GameBoard endlessGameLoop(ull currentBestScore, competition_mode_t cm, while (loop_again && ((mainmenustatus[FLAG_START_GAME] == true) || (mainmenustatus[FLAG_CONTINUE_GAME] == true))) { std::tie(loop_again, currentgamestatus) = soloGameLoop(currentgamestatus); } + auto properGameboard = std::get(currentgamestatus); DrawAlways(std::cout, DataSuppliment(currentgamestatus, drawEndGameLoopGraphics)); - return gb; + return properGameboard; } Scoreboard::Score make_finalscore_from_game_session(double duration,