Author: crab
Date: Wed Apr 29 03:28:05 2009
New Revision: 35312
URL: http://svn.gna.org/viewcvs/wesnoth?rev=35312&view=rev
Log:
New source file pair: ai/testing.[ch]pp Modified automake/cmake/scons/MSVC9
build configs.
Added:
trunk/src/ai/testing.cpp (with props)
trunk/src/ai/testing.hpp (with props)
Modified:
trunk/projectfiles/VC9/wesnoth.vcproj
trunk/src/CMakeLists.txt
trunk/src/Makefile.am
trunk/src/SConscript
Modified: trunk/projectfiles/VC9/wesnoth.vcproj
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/projectfiles/VC9/wesnoth.vcproj?rev=35312&r1=35311&r2=35312&view=diff
==============================================================================
--- trunk/projectfiles/VC9/wesnoth.vcproj (original)
+++ trunk/projectfiles/VC9/wesnoth.vcproj Wed Apr 29 03:28:05 2009
@@ -2765,6 +2765,10 @@
RelativePath="..\..\src\ai\formula_candidates.cpp"
>
</File>
+ <File
+ RelativePath="..\..\src\ai\testing.cpp"
+ >
+ </File>
</Filter>
</Filter>
<Filter
@@ -3564,6 +3568,10 @@
RelativePath="..\..\src\ai\formula_candidates.hpp"
>
</File>
+ <File
+ RelativePath="..\..\src\ai\testing.hpp"
+ >
+ </File>
</Filter>
</Filter>
<Filter
Modified: trunk/src/CMakeLists.txt
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/CMakeLists.txt?rev=35312&r1=35311&r2=35312&view=diff
==============================================================================
--- trunk/src/CMakeLists.txt (original)
+++ trunk/src/CMakeLists.txt Wed Apr 29 03:28:05 2009
@@ -221,6 +221,7 @@
ai/ai_manager.cpp
ai/ai_move.cpp
ai/ai_village.cpp
+ ai/testing.cpp
animated_game.cpp
attack_prediction.cpp
attack_prediction_display.cpp
Modified: trunk/src/Makefile.am
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/Makefile.am?rev=35312&r1=35311&r2=35312&view=diff
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Wed Apr 29 03:28:05 2009
@@ -51,6 +51,7 @@
ai/ai_manager.cpp \
ai/ai_move.cpp \
ai/ai_village.cpp \
+ ai/testing.cpp \
animated_game.cpp \
attack_prediction.cpp \
attack_prediction_display.cpp \
Modified: trunk/src/SConscript
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/SConscript?rev=35312&r1=35311&r2=35312&view=diff
==============================================================================
--- trunk/src/SConscript (original)
+++ trunk/src/SConscript Wed Apr 29 03:28:05 2009
@@ -156,6 +156,7 @@
ai/ai_manager.cpp
ai/ai_move.cpp
ai/ai_village.cpp
+ ai/testing.cpp
animated_game.cpp
attack_prediction.cpp
attack_prediction_display.cpp
Added: trunk/src/ai/testing.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai/testing.cpp?rev=35312&view=auto
==============================================================================
--- trunk/src/ai/testing.cpp (added)
+++ trunk/src/ai/testing.cpp Wed Apr 29 03:28:05 2009
@@ -1,0 +1,41 @@
+/* $Id$ */
+/*
+ Copyright (C) 2009 by Yurii Chernyi <[email protected]>
+ 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()
+{
+}
Propchange: trunk/src/ai/testing.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/src/ai/testing.cpp
------------------------------------------------------------------------------
svn:keywords = 'Author Date Id Revision'
Added: trunk/src/ai/testing.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai/testing.hpp?rev=35312&view=auto
==============================================================================
--- trunk/src/ai/testing.hpp (added)
+++ trunk/src/ai/testing.hpp Wed Apr 29 03:28:05 2009
@@ -1,0 +1,51 @@
+/* $Id$ */
+/*
+ Copyright (C) 2009 by Yurii Chernyi <[email protected]>
+ 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
Propchange: trunk/src/ai/testing.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/src/ai/testing.hpp
------------------------------------------------------------------------------
svn:keywords = 'Author Date Id Revision'
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits