Mentions légales du service

Skip to content
Snippets Groups Projects
Commit ad73587a authored by Fabien Grzeskowiak's avatar Fabien Grzeskowiak
Browse files

Merge branch '19-basic-output' into 'master'

Resolve "basic output file"

Closes #19

See merge request OCSR/OCSR!27
parents 70521af8 f0bc0d69
No related branches found
No related tags found
1 merge request!27Resolve "basic output file"
......@@ -28,6 +28,8 @@
#include <core/world.h>
#include <core/agent.h>
#include <fstream>
class CrowdSimulator {
private:
......@@ -56,6 +58,8 @@ class CrowdSimulator {
*/
void runWorld(int steps);
void AppendPosInOutput(std::ofstream outfile, double time, Agent* agent);
};
......
......@@ -24,3 +24,12 @@
*/
#include <core/crowdSimulator.h>
void CrowdSimulator::AppendPosInOutput(std::ofstream outfile, double time, Agent* agent)
{
if(outfile.is_open())
{
outfile << time << " " << agent->getPosition().x() << " " << agent->getPosition().y() << std::endl;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment