The Battle for Wesnoth  1.19.0-dev
testing.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 - 2024
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 
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_end(unsigned int side)
Definition: testing.cpp:40
static void log_victory(std::set< unsigned int > teams)
Definition: testing.cpp:81
static void log_game_end()
Definition: testing.cpp:102
static void log_turn(const char *msg, unsigned int side)
Definition: testing.cpp:45
static void log_draw()
Definition: testing.cpp:75
static void log_game_start()
Definition: testing.cpp:90
static void log_turn_start(unsigned int side)
Definition: testing.cpp:35
static void msg(const char *act, debug_info &i, const char *to="", const char *result="")
Definition: debugger.cpp:109