The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
testing.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 - 2016 by Yurii Chernyi <[email protected]>
3  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 /**
16  * @file
17  * Gather statistics important for AI testing and output them
18  */
19 
20 #ifndef AI_TESTING_HPP_INCLUDED
21 #define AI_TESTING_HPP_INCLUDED
22 
23 #include "global.hpp"
24 
25 #include <vector>
26 
27 class ai_testing{
28 public:
29  /*
30  * Log at start of the turn
31  */
32  static void log_turn_start( unsigned int side );
33 
34 
35  /*
36  * Log at end of the turn
37  */
38  static void log_turn_end( unsigned int side );
39 
40  /*
41  * Log in case of draw
42  */
43  static void log_draw();
44 
45 
46  /*
47  * Log in case of victory
48  * teams vector of winner teams
49  */
50  static void log_victory( std::set<unsigned int> teams );
51 
52 
53  /*
54  * Log at game start
55  */
56  static void log_game_start();
57 
58 
59  /*
60  * Log at game end
61  */
62  static void log_game_end();
63 
64 protected:
65 
66  static void log_turn( const char *msg, unsigned int side );
67 
68 };
69 
70 #endif
static void log_turn_start(unsigned int side)
Definition: testing.cpp:35
static void log_turn_end(unsigned int side)
Definition: testing.cpp:40
static void log_turn(const char *msg, unsigned int side)
Definition: testing.cpp:45
static void log_victory(std::set< unsigned int > teams)
Definition: testing.cpp:81
static void log_game_end()
Definition: testing.cpp:103
static void log_draw()
Definition: testing.cpp:75
static std::vector< team > *& teams
Definition: team.cpp:50
static void log_game_start()
Definition: testing.cpp:90
static void msg(const char *act, debug_info &i, const char *to="", const char *result="")
Definition: debugger.cpp:112