<commit_before>#include "Room.h"

Room::Room():
    m_objects(std::vector<Object *>()),
    m_fireDetectors(std::vector<FireDetector *>())
{
}

Room::~Room()
{
    for(auto it = m_objects.begin(); it != m_objects.end(); ++it)
        delete *it;

    for(auto  it = m_fireDetectors.begin(); it != m_fireDetectors.end(); ++it)
        delete *it;
}

void Room::addObject(Object * obj)
{
    m_objects.push_back(obj);
}

void Room::addFireDetector(FireDetector * fd)
{
    m_fireDetectors.push_back(fd);
}

void Room::extinguishFire()
{
    for(auto it = m_objects.begin(); it != m_objects.end(); ++it)
        (*it)->stopFire();
}

void Room::draw(sf::RenderWindow * window) const{

	for (auto it = m_objects.cbegin(); it != m_objects.cend(); ++it)
		(*it)->draw(window);

	//for (auto it = m_fireDetectors.cbegin(); it != m_fireDetectors.cend(); ++it)
	//	(*it)->draw(window);
}

void Room::update()
{
	//TODO: si le fireDetector dtecte le character -> extinguishFire()
}<commit_msg>fireDetector drawing<commit_after>#include "Room.h"

Room::Room():
    m_objects(std::vector<Object *>()),
    m_fireDetectors(std::vector<FireDetector *>())
{
}

Room::~Room()
{
    for(auto it = m_objects.begin(); it != m_objects.end(); ++it)
        delete *it;

    for(auto  it = m_fireDetectors.begin(); it != m_fireDetectors.end(); ++it)
        delete *it;
}

void Room::addObject(Object * obj)
{
    m_objects.push_back(obj);
}

void Room::addFireDetector(FireDetector * fd)
{
    m_fireDetectors.push_back(fd);
}

void Room::extinguishFire()
{
    for(auto it = m_objects.begin(); it != m_objects.end(); ++it)
        (*it)->stopFire();
}

void Room::draw(sf::RenderWindow * window) const{

	for (auto it = m_objects.cbegin(); it != m_objects.cend(); ++it)
		(*it)->draw(window);

	for (auto it = m_fireDetectors.cbegin(); it != m_fireDetectors.cend(); ++it)
		(*it)->draw(window);
}

void Room::update()
{
	//TODO: si le fireDetector dtecte le character -> extinguishFire()
}
{'fraction_non_alphanumeric': 0.19807008633824277, 'fraction_numerical': 0.0, 'mean_word_length': 4.211640211640212, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5167152', 'n_tokens_mistral': 762, 'n_tokens_neox': 735, 'n_words': 139}