The Battle for Wesnoth  1.15.12+dev
testing.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 - 2018 by Yurii Chernyi <terraninfo@terraninfo.net>
3  Part of the Battle for Wesnoth Project https://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  * Log at end of the turn
33  */
34  static void log_turn_end( unsigned int side );
35 
36  /*
37  * Log in case of draw
38  */
39  static void log_draw();
40 
41  /*
42  * Log in case of victory
43  * teams vector of winner teams
44  */
45  static void log_victory( std::set<unsigned int> teams );
46 
47  /*
48  * Log at game start
49  */
50  static void log_game_start();
51 
52  /*
53  * Log at game end
54  */
55  static void log_game_end();
56 
57 protected:
58 
59  static void log_turn( const char *msg, unsigned int side );
60 
61 };
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 msg(const char *act, debug_info &i, const char *to="", const char *result="")
Definition: debugger.cpp:109
static void log_game_end()
Definition: testing.cpp:102
static void log_draw()
Definition: testing.cpp:75
static void log_game_start()
Definition: testing.cpp:90