Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,20 @@ void testRemovingEntityFromEnvironment() {
std::cout << "Success" << std::endl;
}

void testPlacingMultipleEntities() {
std::cout << "---" << std::endl;
std::cout << "Test 10 - Placing multiple entities" << std::endl;
Entity entity1("Bob");
Entity entity2("Phil");
Entity entity3("Clarisse");
Environment environment("Earth", 6);
environment.addEntity(entity1);
environment.addEntity(entity2);
environment.addEntity(entity3);
assert(environment.getNumEntities() == 3);
std::cout << "Success" << std::endl;
}

void seedRandomNumberGenerator() {
srand (time (NULL));
}
Expand All @@ -136,5 +150,6 @@ int main() {
testRemovingEntityFromGrid();
testPlacingEntityInEnvironment();
testRemovingEntityFromEnvironment();
testPlacingMultipleEntities();
return 0;
}
Binary file modified tests
Binary file not shown.