]> ruin.nu Git - icfp05.git/commitdiff
added possibility to change cost
authorMichael Andreen <harv@ruin.nu>
Sun, 10 Jul 2005 12:06:08 +0000 (12:06 +0000)
committerMichael Andreen <harv@ruin.nu>
Sun, 10 Jul 2005 12:06:08 +0000 (12:06 +0000)
botsrc/bot.h
copsrc/cop.h
copsrc/copsrc.pro
robbersrc/robber.h
robbersrc/robbersrc.pro

index aad7473d6d24de7c004f10a19b7374b11ee6529d..15be23460cefcf566370f030cc2e7ed1c20613fc 100644 (file)
@@ -84,6 +84,8 @@ class Bot {
                virtual void vote();
                virtual void voteResult();
                void getPlayers();
+               template<class Goal, class Cost>
+               std::list<std::string> shortestPath(const std::string& from, PlayerType type, const Goal& goal, const Cost& cost, bool reverse = false);
                template<class Goal>
                std::list<std::string> shortestPath(const std::string& from, PlayerType type, const Goal& goal, bool reverse = false);
 
@@ -104,6 +106,7 @@ class Bot {
                __gnu_cxx::hash_map<std::string, int> _winningPlans;
 };
 
+
 class SimpleSPGoal{
        std::string _to;
        int _limit;
index 6f8af753ae1e19dcb6c502b3832b5b01780e88cd..ed53f415b0f3e74c15b15965d5f32a25f23d888c 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __COP_H__
 #define __COP_H__
 
-#include <bot.h>
+#include "../botsrc/bot.h"
 #include <utility>
 
 class Cop : public Bot {
index f0edde67f27fe22725bdc1549f63dacc3874da2f..4d2dfac0a43ee879e8ca1ea361e4876226ae6827 100644 (file)
@@ -3,14 +3,12 @@
 ######################################################################
 
 TEMPLATE = app
-INCLUDEPATH += ../botsrc
 CONFIG -= qt
 CONFIG += debug
 unix:LIBS += -lm
 TARGET = ../cop
-QMAKE_CFLAGS_RELEASE += -march=athlon-xp
 
 
 # Input
-HEADERS += cop.h
+HEADERS += cop.h ../botsrc/bot.h ../botsrc/shortestPath.cpp
 SOURCES += cop.cpp ../botsrc/bot.cpp
index b4f3e12326270d1175c94711d65106d4b45b287f..7624986cbbfa2a48a41a82156200aa4111910383 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __ROBBER_H__
 #define __ROBBER_H__
 
-#include "bot.h"
+#include "../botsrc/bot.h"
 
 class Robber : public Bot {
        public:
index 1e0d738927faf50494e869de90ad3d3d10027201..e95eca1924720d2a0a495e5cc9bc0ea3cda30206 100644 (file)
@@ -3,14 +3,12 @@
 ######################################################################
 
 TEMPLATE = app
-INCLUDEPATH += ../botsrc
 CONFIG -= qt
 #CONFIG += debug
 unix:LIBS += -lm
 TARGET = ../robber
-#QMAKE_CXXFLAGS_RELEASE += -march=athlon-xp -g
 
 
 # Input
-HEADERS += robber.h ../botsrc/bot.h
+HEADERS += robber.h ../botsrc/bot.h ../botsrc/shortestPath.cpp
 SOURCES += robber.cpp ../botsrc/bot.cpp