Commit 6084a789 authored by Boris Cazic's avatar Boris Cazic
Browse files

Voisinage

parent 3a6f28a0
Pipeline #79057 passed with stage
in 15 seconds
...@@ -8,19 +8,16 @@ ...@@ -8,19 +8,16 @@
#ifndef voisinage_h #ifndef voisinage_h
#define voisinage_h #define voisinage_h
#include "reseau_cellule_etats.h"
#include <stdio.h> #include <stdio.h>
#include <iostream> #include <iostream>
#include "reseau_cellule_etats.h"
#include <string.h> #include <string.h>
#include <vector> #include <vector>
using namespace std; using namespace std;
class Voisinage { class Voisinage {
private : private :
const Cellule* celluleCentre; const Cellule* celluleCentre;
vector<Cellule*> voisinage; vector<Cellule*> voisinage;
unsigned int r; unsigned int r;
...@@ -50,16 +47,13 @@ public: ...@@ -50,16 +47,13 @@ public:
return (vsn->voisinage.size() <= i); return (vsn->voisinage.size() <= i);
} }
Cellule* currentItem(){ Cellule* currentItem(){
return vsn->voisinage[i]; return vsn->voisinage[i];
} }
}; };
Voisinage(); Voisinage(const Cellule* centre, vector<Cellule*> v) : celluleCentre(centre), voisinage(v) {}
~Voisinage(); ~Voisinage();
Cellule getCelluleCentre()const {return *celluleCentre;} Cellule getCelluleCentre()const {return *celluleCentre;}
void setr(unsigned int rayon); void setr(unsigned int rayon);
......
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