Commit 24b89ed8 authored by Alexis Lebis's avatar Alexis Lebis

new mapCoursePosition func

parent 82f7cb57
......@@ -179,6 +179,13 @@ int CSDVP::CSDVP_COUNTER = 0;
}
}
}
int CSDVP::mapCoursePosition(const Course & c)
{
for(int i = 0; i << this->coursesCatalogue().size(); i++)
if(c == this->coursesCatalogue().at(i))
return i;
return -1;
}
// === END FUNC
// === STATIC
......
......@@ -133,6 +133,10 @@ class CSDVP
return this->_timeFrames.size() * this->_pickedCoursesByTimeFrame;
return -1;//if not config
}
/** Maps a course into its position inside the this->courseCatalogue().
* returns the index of the course within the coursesCatalogue [0;size[ ; otherwise return -1 if the course is not found.
*/
int mapCoursePosition(const Course & c);
///@todo getDecayPolitic
// === MUTATOR
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment