mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-28 22:04:24 +00:00
New source file pair: ai/testing.[ch]pp...
Modified automake/cmake/scons/MSVC9 build configs.
This commit is contained in:
parent
6a1e8c474e
commit
ab540dca15
@ -2765,6 +2765,10 @@
|
|||||||
RelativePath="..\..\src\ai\formula_candidates.cpp"
|
RelativePath="..\..\src\ai\formula_candidates.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\src\ai\testing.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
<Filter
|
||||||
@ -3564,6 +3568,10 @@
|
|||||||
RelativePath="..\..\src\ai\formula_candidates.hpp"
|
RelativePath="..\..\src\ai\formula_candidates.hpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\src\ai\testing.hpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
<Filter
|
||||||
|
@ -221,6 +221,7 @@ SET(wesnoth-main_SRC
|
|||||||
ai/ai_manager.cpp
|
ai/ai_manager.cpp
|
||||||
ai/ai_move.cpp
|
ai/ai_move.cpp
|
||||||
ai/ai_village.cpp
|
ai/ai_village.cpp
|
||||||
|
ai/testing.cpp
|
||||||
animated_game.cpp
|
animated_game.cpp
|
||||||
attack_prediction.cpp
|
attack_prediction.cpp
|
||||||
attack_prediction_display.cpp
|
attack_prediction_display.cpp
|
||||||
|
@ -51,6 +51,7 @@ wesnoth_source = \
|
|||||||
ai/ai_manager.cpp \
|
ai/ai_manager.cpp \
|
||||||
ai/ai_move.cpp \
|
ai/ai_move.cpp \
|
||||||
ai/ai_village.cpp \
|
ai/ai_village.cpp \
|
||||||
|
ai/testing.cpp \
|
||||||
animated_game.cpp \
|
animated_game.cpp \
|
||||||
attack_prediction.cpp \
|
attack_prediction.cpp \
|
||||||
attack_prediction_display.cpp \
|
attack_prediction_display.cpp \
|
||||||
|
@ -156,6 +156,7 @@ wesnoth_sources = Split("""
|
|||||||
ai/ai_manager.cpp
|
ai/ai_manager.cpp
|
||||||
ai/ai_move.cpp
|
ai/ai_move.cpp
|
||||||
ai/ai_village.cpp
|
ai/ai_village.cpp
|
||||||
|
ai/testing.cpp
|
||||||
animated_game.cpp
|
animated_game.cpp
|
||||||
attack_prediction.cpp
|
attack_prediction.cpp
|
||||||
attack_prediction_display.cpp
|
attack_prediction_display.cpp
|
||||||
|
41
src/ai/testing.cpp
Normal file
41
src/ai/testing.cpp
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
/*
|
||||||
|
Copyright (C) 2009 by Yurii Chernyi <terraninfo@terraninfo.net>
|
||||||
|
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License version 2
|
||||||
|
or at your option any later version.
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY.
|
||||||
|
|
||||||
|
See the COPYING file for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gather statistics important for AI testing and output them
|
||||||
|
* @file ai/testing.cpp
|
||||||
|
*/
|
||||||
|
#include "testing.hpp"
|
||||||
|
#include "../log.hpp"
|
||||||
|
|
||||||
|
static lg::log_domain log_ai_testing("ai/testing");
|
||||||
|
#define DBG_AI_TESTING LOG_STREAM(debug, log_ai_testing)
|
||||||
|
#define LOG_AI_TESTING LOG_STREAM(info, log_ai_testing)
|
||||||
|
#define ERR_AI_TESTING LOG_STREAM(err, log_ai_testing)
|
||||||
|
|
||||||
|
void ai_testing::log_turn_start()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ai_testing::log_draw()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ai_testing::log_victory()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ai_testing::log_unknown_error_while_playing_level()
|
||||||
|
{
|
||||||
|
}
|
51
src/ai/testing.hpp
Normal file
51
src/ai/testing.hpp
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
/*
|
||||||
|
Copyright (C) 2009 by Yurii Chernyi <terraninfo@terraninfo.net>
|
||||||
|
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License version 2
|
||||||
|
or at your option any later version.
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY.
|
||||||
|
|
||||||
|
See the COPYING file for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file ai/testing.hpp
|
||||||
|
* Gather statistics important for AI testing and output them
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef AI_TESTING_HPP_INCLUDED
|
||||||
|
#define AI_TESTING_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "../global.hpp"
|
||||||
|
|
||||||
|
class ai_testing{
|
||||||
|
public:
|
||||||
|
/*
|
||||||
|
* Log at start of the turn
|
||||||
|
*/
|
||||||
|
static void log_turn_start();
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Log in case of draw
|
||||||
|
*/
|
||||||
|
static void log_draw();
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Log in case of victory
|
||||||
|
*/
|
||||||
|
static void log_victory();
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Log in case of unknown error while playing level
|
||||||
|
*/
|
||||||
|
static void log_unknown_error_while_playing_level();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
Loading…
x
Reference in New Issue
Block a user