The Battle for Wesnoth  1.17.0-dev
testing.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 - 2021
3  by Yurii Chernyi <terraninfo@terraninfo.net>
4  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY.
12 
13  See the COPYING file for more details.
14 */
15 
16 /**
17  * @file
18  * Gather statistics important for AI testing and output them
19  */
20 
21 #pragma once
22 
23 #include <vector>
24 
25 class ai_testing{
26 public:
27  /*
28  * Log at start of the turn
29  */
30  static void log_turn_start( unsigned int side );
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  * Log in case of victory
44  * teams vector of winner teams
45  */
46  static void log_victory( std::set<unsigned int> teams );
47 
48  /*
49  * Log at game start
50  */
51  static void log_game_start();
52 
53  /*
54  * Log at game end
55  */
56  static void log_game_end();
57 
58 protected:
59 
60  static void log_turn( const char *msg, unsigned int side );
61 
62 };
static void log_turn_start(unsigned int side)
Definition: testing.cpp:36
static void log_turn_end(unsigned int side)
Definition: testing.cpp:41
static void log_turn(const char *msg, unsigned int side)
Definition: testing.cpp:46
static void log_victory(std::set< unsigned int > teams)
Definition: testing.cpp:82
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:103
static void log_draw()
Definition: testing.cpp:76
static void log_game_start()
Definition: testing.cpp:91