20 lines
311 B
C++
20 lines
311 B
C++
#include "Scene.h"
|
|
#include <vector>
|
|
|
|
Scene::Scene(std::vector<Shape*> shapes) : shapes(std::move(shapes)) {
|
|
|
|
}
|
|
|
|
void Scene::draw() {
|
|
ansiConsole.clearScreen();
|
|
for(Shape* shape : shapes) {
|
|
shape->draw();
|
|
}
|
|
}
|
|
|
|
Scene::~Scene() {
|
|
for(Shape* shape : shapes) {
|
|
delete shape;
|
|
}
|
|
}
|