diff options
Diffstat (limited to 'NaiveCollisionChecker.cpp')
-rw-r--r-- | NaiveCollisionChecker.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/NaiveCollisionChecker.cpp b/NaiveCollisionChecker.cpp new file mode 100644 index 0000000..db277ab --- /dev/null +++ b/NaiveCollisionChecker.cpp @@ -0,0 +1,19 @@ +#include "NaiveCollisionChecker.h" +#include "Museum.h" +#include "People.h" +#include "Artist.h" + +void NaiveCollisionChecker::check() { + auto artists = this->museum.people.get_artists(); + for (Artist * artist : artists) artist->colliding = false; + auto begin = artists.begin(); + auto end = artists.end(); + for (auto it1 = begin; it1 != end; ++it1) { + auto it2 = it1; + ++it2; + for (; it2 != end; ++it2) { + this->compare(**it1, **it2); + } + } +} + |