X-Git-Url: https://ruin.nu/git/?p=icfp05.git;a=blobdiff_plain;f=cop%2Fcop.cpp;h=76215630ad1d2e946c6455256980bd9545f8ad18;hp=3db7d419e329f0571946e93d7587f17112b8f251;hb=518c5700d8f00b70e2b5b6d448efb7b474d57157;hpb=c2b823beca5d24afbac2c0489837eb7ec93bfbd3 diff --git a/cop/cop.cpp b/cop/cop.cpp index 3db7d41..7621563 100644 --- a/cop/cop.cpp +++ b/cop/cop.cpp @@ -7,7 +7,39 @@ using namespace std; using namespace __gnu_cxx; string Cop::turn(){ - + cout << "inf\\" << endl; + cout << "inf/" << endl; + + string input; + + //ignore From-inform + do{ + getline(cin,input); + }while(input != "from/"); + + cout << "plan\\" << endl; + //cout << "plan: " << _name << endl; + cout << "plan/" << endl; + + //ignore From-plan + do{ + getline(cin,input); + }while(input != "from/"); + + cout << "vote\\" << endl; + cout << "vote: " << _name << endl; + for (hash_map::const_iterator player = _players.begin(); + player != _players.end(); ++player){ + if (player->second.type != robber && player->first != _name){ + cout << "vote: " << player->first << endl; + cerr << "voted for " << player->first << " of type: " << player->second.type << endl; + } + } + cout << "vote/" << endl; + + //Ignore vote + getline(cin,input); + return _location; }