]> ruin.nu Git - icfp05.git/commitdiff
reading evidence
authorMichael Andreen <harv@ruin.nu>
Sat, 25 Jun 2005 17:05:50 +0000 (17:05 +0000)
committerMichael Andreen <harv@ruin.nu>
Sat, 25 Jun 2005 17:05:50 +0000 (17:05 +0000)
bot/bot.cpp
bot/bot.h

index dd516328979baf7ea150909a1c69d0f85f20f287..6a486025c77ef869315e0e4f86e971e56e91bf9c 100644 (file)
@@ -198,6 +198,11 @@ void Bot::updateWorld(){
                if (input == "ev/")
                        break;
                istringstream evidence(input);
+               int world;
+               evidence >> input;
+               evidence >> input;
+               evidence >> world;
+               _evidence[world] = input;
        }
        
        getline(cin,input);
index 1c40b44214d8ae1eef0277e7796d37abc26c0d32..efe373f77ed5c26890e19d2cd2360310636559fd 100644 (file)
--- a/bot/bot.h
+++ b/bot/bot.h
@@ -98,6 +98,7 @@ class Bot {
        __gnu_cxx::hash_map<std::string, Intersection> _intersections;
        __gnu_cxx::hash_map<std::string, Player> _players;
        __gnu_cxx::hash_map<std::string, int> _banks;
+       std::map<int, std::string> _evidence;
        std::map<PlayerType, std::string> _playerTypeNames;
        std::map<std::string, PlayerType> _playerTypes;
        std::string _name;