Skip to content
Snippets Groups Projects
Commit 4c1e3b56 authored by Victor Dubois's avatar Victor Dubois
Browse files

restart using more attractors (up to 16)

parent 073b3bc1
Branches standAloneStrategy
No related tags found
No related merge requests found
......@@ -127,18 +127,19 @@ Goldo2018::Goldo2018(bool isYellow) : StrategieV3(isYellow)
#else
//positionsCart.push_back(std::make_pair(300, 300));//OK test left
//positionsCart.push_back(std::make_pair(301, 450));//OK mid-red
positionsCart.push_back(std::make_pair(301, 450));//OK mid-red
positionsCart.push_back(std::make_pair(700, 450));//OK out of red
positionsCart.push_back(std::make_pair(700, 750));//OK out of green
positionsCart.push_back(std::make_pair(300, 750));//OK mid green
//positionsCart.push_back(std::make_pair(300, 1200));// mid blue
//positionsCart.push_back(std::make_pair(700, 1200));// out of blue
positionsCart.push_back(std::make_pair(700, 850));//OK out of green
positionsCart.push_back(std::make_pair(300, 600));//OK mid red/green
positionsCart.push_back(std::make_pair(300, 750));// mid green
positionsCart.push_back(std::make_pair(700, 1300));// out of blue
positionsCart.push_back(std::make_pair(1700, 450));// out of top of accel
positionsCart.push_back(std::make_pair(1700, 300));// in front of top of accel
positionsCart.push_back(std::make_pair(2250, 450));// out of goldenium
positionsCart.push_back(std::make_pair(2250, 300));// in front of goldenium
positionsCart.push_back(std::make_pair(1500, 800));// waypoint behind backhole
//positionsCart.push_back(std::make_pair(1000, 700));// 2nd waypoint behind backhole disabled because of weird bug
positionsCart.push_back(std::make_pair(2000, 800));// 2nd waypoint behind backhole
positionsCart.push_back(std::make_pair(1200, 450));// waypoint begin
//m_attractors = attractors;
......@@ -150,28 +151,28 @@ Goldo2018::Goldo2018(bool isYellow) : StrategieV3(isYellow)
// Création des étapes
// Les étapes correspondant à des actions sont créées automatiquement lors de l'ajout d'actions
for (int i = 0; i < 12; i++) {
for (int i = 0; i < positionsCart.size(); i++) {
positionFromAttractor(i);
}
// Initialisation in simulator in initKrabi.cpp
//int start = Etape::makeEtape(positionFromAttractor(0), Etape::DEPART); // départ au fond de la zone de départ
int attractorId = 0;
int mid_red = Etape::makeEtape(positionFromAttractor(attractorId++), Etape::DEPART); // départ au fond de la zone de départ
//int start = Etape::makeEtape(Position(200, 350, true), Etape::DEPART); // départ au fond de la zone de départ
// COLORS
int mid_red = Etape::makeEtape(Position(0,0, true), Etape::DEPART);
int attractorId = 0;
//int mid_red = Etape::makeEtape(Position(0,0, true), Etape::DEPART);
int out_of_red = Etape::makeEtape(positionFromAttractor(attractorId++));
Etape::get(mid_red)->addVoisins(out_of_red);// out of start
int out_of_green = Etape::makeEtape(positionFromAttractor(attractorId++));
int mid_green = Etape::makeEtape(new Abeille(positionFromAttractor(attractorId++)));
Etape::get(mid_green)->addVoisins(out_of_green);// push greenium
int middle_red_green = Etape::makeEtape(new Abeille(positionFromAttractor(attractorId++)));
Etape::get(middle_red_green)->addVoisins(out_of_green);// push redium from greenium
Etape::get(out_of_red)->addVoisins(out_of_green);// From red to green
//int mid_blue = Etape::makeEtape(new Abeille(positionFromAttractor(attractorId++)));
//int out_of_blue = Etape::makeEtape(positionFromAttractor(attractorId++));
//Etape::get(mid_blue)->addVoisins(out_of_blue);// push blue
//Etape::get(out_of_blue)->addVoisins(out_of_green);// from green to blue
int mid_green = Etape::makeEtape(new Abeille(positionFromAttractor(attractorId++)));
int out_of_blue = Etape::makeEtape(positionFromAttractor(attractorId++));
Etape::get(mid_green)->addVoisins(out_of_blue);// push greenium from blue
Etape::get(out_of_blue)->addVoisins(out_of_green);// from green to blue
// ACCELERATOR
int out_of_top_of_accel = Etape::makeEtape(positionFromAttractor(attractorId++));
......@@ -191,10 +192,16 @@ Etape::get(out_of_green)->addVoisins(waypoint_behind_backhole);// green to waypo
Etape::get(out_of_red)->addVoisins(waypoint_behind_backhole);// red to waypoint
Etape::get(out_of_top_of_accel)->addVoisins(waypoint_behind_backhole);// accel to waypoint
//int second_waypoint_behind_backhole = Etape::makeEtape(positionFromAttractor(11));
//Etape::get(out_of_top_of_accel)->addVoisins(second_waypoint_behind_backhole);// accel to 2waypoint
//Etape::get(waypoint_behind_backhole)->addVoisins(second_waypoint_behind_backhole);// waypoint to 2waypoint
int second_waypoint_behind_backhole = Etape::makeEtape(positionFromAttractor(attractorId++));
Etape::get(out_of_top_of_accel)->addVoisins(second_waypoint_behind_backhole);// accel to 2waypoint
Etape::get(waypoint_behind_backhole)->addVoisins(second_waypoint_behind_backhole);// waypoint to 2waypoint
Etape::get(out_of_goldenium)->addVoisins(second_waypoint_behind_backhole);// waypoint to 2waypoint
int waypoint_begin = Etape::makeEtape(positionFromAttractor(attractorId++));
Etape::get(out_of_top_of_accel)->addVoisins(waypoint_begin);// accel to 3waypoint
Etape::get(waypoint_behind_backhole)->addVoisins(waypoint_begin);// waypoint to 3waypoint
Etape::get(out_of_red)->addVoisins(waypoint_begin);// red to 3waypoint
Etape::get(out_of_green)->addVoisins(waypoint_begin);// red to 3waypoint
// Reservoir eau proche
//int reservoirProche = Etape::makeEtape(new ReservoirEau(Position(220, 840, true)));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment