using namespace std;
using namespace __gnu_cxx;
-string Cop::turn(){
- //cerr << "New turn" << endl;
- string input;
-
- sendInformation();
- //cerr << "Getting information " << endl;
- getInformation();
-
- sendPlan();
- getPlans();
-
- vote();
-
- getline(cin,input);
- if (input != "nowinner:"){
- string winner = value<string>(input);
- if (winner != _name)
- ++_winningPlans[winner];
- }
-
- return _location;
-}
-
void Cop::preGamePreparations(){
//cerr << "Preparing.." << endl;
_copTargets[_name].first = _robberLocation;
location != maybeRobber.end(); ++location){
if (location->second > 0)
location->second /= possibilities;
+ cerr << "World: " << _world << endl;;
cout << "inf: " << _robber << " " << location->first << " " << _playerTypeNames[robber] << " "
<< _world << " " << location->second << endl;
}
cout << "plan/" << endl;
}
-void Cop::getPlans(){
- string input;
-
-
- //ignore From-plan
- do{
- getline(cin,input);
- }while(input != "from/");
-
-
-}
-
-void Cop::vote(){
- cout << "vote\\" << endl;
- cout << "vote: " << _name << endl;
- priority_queue<pair<int,string> > players;
- for (hash_map<string,int>::const_iterator player = _winningPlans.begin();
- player != _winningPlans.end(); ++player){
- players.push(pair<int,string>(-player->second, player->first));
- }
- while (players.size() > 0){
- const pair<int,string>& player = players.top();
- cout << "vote: " << player.second << endl;
- //cerr << "voted for " << player.second << " with " << player.first << " previously won plans" << endl;
- players.pop();
- }
- cout << "vote/" << endl;
+void Cop::move(std::string location){
+ cout << "cmov\\" << endl;
+ cout << "straight-arrow:" << endl;
+ cout << "mov\\" << endl;
+ Bot::move(location);
+ cout << "mov/" << endl;
+ cout << "acc\\" << endl;
+ cout << "acc/" << endl;
+ cout << "cmov/" << endl;
}
int main(){