From 6e0e88b97ae8cc48b1c743ac8abd7945f0bdd18b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Wed, 15 Nov 2023 23:07:39 +0100 Subject: [PATCH] clean up imports --- include/command_line_interface.h | 2 +- include/download.h | 6 ++---- include/game_interface.h | 1 + include/null_buffer.h | 2 +- include/parse_game.h | 2 +- include/state_explorer.h | 2 +- src/check_games.cpp | 1 - src/command_line_interface.cpp | 6 ++++-- src/download.cpp | 1 + src/game_interface.cpp | 3 ++- src/main.cpp | 1 + src/parse_game.cpp | 2 ++ src/state_explorer.cpp | 14 ++++++-------- 13 files changed, 23 insertions(+), 20 deletions(-) diff --git a/include/command_line_interface.h b/include/command_line_interface.h index 9ab9f87..db6206c 100644 --- a/include/command_line_interface.h +++ b/include/command_line_interface.h @@ -3,7 +3,7 @@ #include #include -#include "game_state.h" +#include "hanabi_types.hpp" namespace Hanabi { diff --git a/include/download.h b/include/download.h index 5b0d1a3..834d281 100644 --- a/include/download.h +++ b/include/download.h @@ -3,13 +3,11 @@ #include #include -#include -#include +#include #include -#include "game_state.h" -#include "myassert.h" +#include "game_interface.h" namespace Download { diff --git a/include/game_interface.h b/include/game_interface.h index 9a2c884..221c003 100644 --- a/include/game_interface.h +++ b/include/game_interface.h @@ -6,6 +6,7 @@ #include #include #include + #include "hanabi_types.hpp" diff --git a/include/null_buffer.h b/include/null_buffer.h index 2fb791f..75bba42 100644 --- a/include/null_buffer.h +++ b/include/null_buffer.h @@ -1,7 +1,7 @@ #ifndef DYNAMIC_PROGRAM_NULL_BUFFER_H #define DYNAMIC_PROGRAM_NULL_BUFFER_H -#include +#include namespace NullBuffer { diff --git a/include/parse_game.h b/include/parse_game.h index 471ff1c..cc2fe64 100644 --- a/include/parse_game.h +++ b/include/parse_game.h @@ -3,7 +3,7 @@ #include -#include "game_state.h" +#include "game_interface.h" namespace Hanabi { // These are overloads that the boost/json library uses for parsing. diff --git a/include/state_explorer.h b/include/state_explorer.h index a3692bb..5af2c43 100644 --- a/include/state_explorer.h +++ b/include/state_explorer.h @@ -2,7 +2,7 @@ #define DYNAMIC_PROGRAM_CLI_INTERFACE_H #include -#include "game_state.h" +#include "game_interface.h" namespace Hanabi { void cli(const std::shared_ptr& game); diff --git a/src/check_games.cpp b/src/check_games.cpp index cde1d4d..71b4985 100644 --- a/src/check_games.cpp +++ b/src/check_games.cpp @@ -1,6 +1,5 @@ #include -#include "game_state.h" #include "download.h" void check_games(unsigned num_players, unsigned max_draw_pile_size, unsigned first_game = 0, unsigned last_game = 9999) { diff --git a/src/command_line_interface.cpp b/src/command_line_interface.cpp index d0cc284..d49f059 100644 --- a/src/command_line_interface.cpp +++ b/src/command_line_interface.cpp @@ -1,8 +1,10 @@ -#include "command_line_interface.h" +#include + #include "download.h" #include "null_buffer.h" #include "state_explorer.h" -#include "boost/program_options.hpp" + +#include "command_line_interface.h" namespace bpo = boost::program_options; diff --git a/src/download.cpp b/src/download.cpp index 492d067..37bb785 100644 --- a/src/download.cpp +++ b/src/download.cpp @@ -2,6 +2,7 @@ #include #include "parse_game.h" +#include "game_state.h" #include "download.h" diff --git a/src/game_interface.cpp b/src/game_interface.cpp index a83947d..98f5b5a 100644 --- a/src/game_interface.cpp +++ b/src/game_interface.cpp @@ -1,6 +1,7 @@ -#include "game_interface.h" #include "myassert.h" +#include "game_interface.h" + namespace Hanabi { std::ostream &operator<<(std::ostream &os, HanabiStateIF const &hanabi_state) diff --git a/src/main.cpp b/src/main.cpp index cc9e2cf..5745737 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,4 +1,5 @@ #include + #include "command_line_interface.h" diff --git a/src/parse_game.cpp b/src/parse_game.cpp index c92b457..97dd85a 100644 --- a/src/parse_game.cpp +++ b/src/parse_game.cpp @@ -1,5 +1,7 @@ #include "parse_game.h" +#include "myassert.h" + namespace Parsing { // This helper function deduces the type and assigns the value with the matching key template diff --git a/src/state_explorer.cpp b/src/state_explorer.cpp index 82c8557..f56b7c3 100644 --- a/src/state_explorer.cpp +++ b/src/state_explorer.cpp @@ -1,17 +1,15 @@ -#include -#include -#include #include #include #include -#include -#include -#include #include #include -#include +#include +#include + +#include +#include + #include "game_state.h" -#include namespace Hanabi {