Commits

David Stone committed fa230cf

Moved DetailedStats into the generic client.

  • Participants
  • Parent commits 822dab8

Comments (0)

Files changed (4)

source/clients/client.cpp

 
 namespace technicalmachine {
 
+DetailedStats const & Client::detailed() const {
+	return detailed_stats;
+}
+
 }	// namespace technicalmachine

source/clients/client.hpp

 #ifndef CLIENTS__CLIENT_HPP_
 #define CLIENTS__CLIENT_HPP_
 
+#include "../team_predictor/detailed_stats.hpp"
+
 namespace technicalmachine {
 
 class Client {
 	public:
+		DetailedStats const & detailed() const;
 		virtual ~Client() { }
+	private:
+		DetailedStats detailed_stats;
 };
 
 }	// namespace technicalmachine

source/clients/network/client.cpp

 	return m_evaluation_constants;
 }
 
-DetailedStats const & Client::detailed() const {
-	return detailed_stats;
-}
-
 void Client::print_with_time_stamp (std::ostream & stream, std::string const & message) const {
 	stream << time_stamp() + " " + message + "\n";
 }

source/clients/network/client.hpp

 
 #include "../../evaluate/evaluate.hpp"
 
-#include "../../team_predictor/detailed_stats.hpp"
-
 namespace technicalmachine {
 class Party;
 enum class Result;
 		void print_with_time_stamp(std::ostream & stream, std::string const & message) const;
 		void handle_channel_message (uint32_t channel_id, std::string const & user, std::string const & message) const;
 		Evaluate const & evaluation_constants() const;
-		DetailedStats const & detailed() const;
 		void send_message(OutMessage & msg);
 	protected:
 		explicit Client(unsigned set_depth);
 		std::random_device rd;
 		std::mt19937 random_engine;
 		std::unique_ptr<boost::asio::ip::tcp::socket> socket;
-		DetailedStats detailed_stats;
 		Evaluate m_evaluation_constants;
 		std::string current_username;
 		std::string current_password;