The Battle for Wesnoth  1.13.10+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 - 2017 by Yurii Chernyi <terraninfo@terraninfo.net>
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 #pragma once
21 
22 #include <vector>
23 
24 class ai_testing{
25 public:
26  /*
27  * Log at start of the turn
28  */
29  static void log_turn_start( unsigned int side );
30 
31 
32  /*
33  * Log at end of the turn
34  */
35  static void log_turn_end( unsigned int side );
36 
37  /*
38  * Log in case of draw
39  */
40  static void log_draw();
41 
42 
43  /*
44  * Log in case of victory
45  * teams vector of winner teams
46  */
47  static void log_victory( std::set<unsigned int> teams );
48 
49 
50  /*
51  * Log at game start
52  */
53  static void log_game_start();
54 
55 
56  /*
57  * Log at game end
58  */
59  static void log_game_end();
60 
61 protected:
62 
63  static void log_turn( const char *msg, unsigned int side );
64 
65 };
static void log_turn_start(unsigned int side)
Definition: testing.cpp:34
static void log_turn_end(unsigned int side)
Definition: testing.cpp:39
static void log_turn(const char *msg, unsigned int side)
Definition: testing.cpp:44
static void log_victory(std::set< unsigned int > teams)
Definition: testing.cpp:80
static void msg(const char *act, debug_info &i, const char *to="", const char *result="")
Definition: debugger.cpp:110
static void log_game_end()
Definition: testing.cpp:102
static void log_draw()
Definition: testing.cpp:74
static void log_game_start()
Definition: testing.cpp:89