diff options
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -219,7 +219,7 @@ int main(int argc,char **argv){ vector<Team> teams; bool opt_pos = false; - vector<array<int,2>> positions; // TODO: use pair? + vector<pair<int,int>> positions; int k = 1; // Increase past options; @@ -233,14 +233,14 @@ int main(int argc,char **argv){ assert(f); teams.push_back(assemble(preprocess(f))); if(opt_pos) { - positions.push_back({(int)strtol(argv[i+1],NULL,10), (int)strtol(argv[i+2],NULL,10)}); // TODO: check if i>argc + positions.emplace_back((int)strtol(argv[i+1],NULL,10), (int)strtol(argv[i+2],NULL,10)); // TODO: check if i>argc i += 2; } } - for(int i=0; i<teams.size(); i++) { + for(int i=0; i<(int)teams.size(); i++) { const Team &t = teams[i]; - Robot &r = opt_pos ? world.create(&t,2,t.banks.size(),false, positions[i][0], positions[i][1]) + Robot &r = opt_pos ? world.create(&t,2,t.banks.size(),false, positions[i].first, positions[i].second) : world.create(&t,2,t.banks.size(),false); for(int i=0;i<(int)t.banks.size();i++){ |