<commit_before>#ifndef SRC_SERVER_WORLD_H_
#define SRC_SERVER_WORLD_H_

#include <memory>
#include <QPoint>
#include <vector>

namespace common {
namespace entity {
class Entity;
class Character;
}
class GameEngine;

typedef std::vector<std::vector<std::vector<std::unique_ptr<entity::Entity> > > > grid_t;

class World {
  public:
    World(int width, int height);

    int GetWidth() const;
    int GetHeight() const;
    bool CheckCoord(QPoint p) const;
    bool IsWalkable(QPoint p) const; // Returns true if a character can walk on this case
    bool StopsFire(QPoint p) const; // Returns true if the case stops fire propagation
    bool AddItem(std::unique_ptr<entity::Entity> entity); // Adds an entity to the grid. Returns false if it fail.
    bool AddCharacter(std::unique_ptr<entity::Character> character); // Adds a character to characters_. Returns false if it fail.
    void removeEntities(); // Removes entities that should be removed

    std::vector<std::unique_ptr<entity::Entity> >::const_iterator IteratorAtBegin(QPoint a);
    std::vector<std::unique_ptr<entity::Entity> >::const_iterator IteratorAtEnd(QPoint a);
    std::vector<std::unique_ptr<entity::Character> >::const_iterator CharacterIteratorBegin();
    std::vector<std::unique_ptr<entity::Character> >::const_iterator CharacterIteratorEnd();
    
  private:
    const int width_; // Width of the world eg number of blocks
    const int height_;
    grid_t entities_;
    std::vector<std::unique_ptr<entity::Character> > characters_;
};

}

#endif<commit_msg>Remove trailing whitespace.<commit_after>#ifndef SRC_SERVER_WORLD_H_
#define SRC_SERVER_WORLD_H_

#include <memory>
#include <QPoint>
#include <vector>

namespace common {
namespace entity {
class Entity;
class Character;
}
class GameEngine;

typedef std::vector<std::vector<std::vector<std::unique_ptr<entity::Entity> > > > grid_t;

class World {
  public:
    World(int width, int height);

    int GetWidth() const;
    int GetHeight() const;
    bool CheckCoord(QPoint p) const;
    bool IsWalkable(QPoint p) const; // Returns true if a character can walk on this case
    bool StopsFire(QPoint p) const; // Returns true if the case stops fire propagation
    bool AddItem(std::unique_ptr<entity::Entity> entity); // Adds an entity to the grid. Returns false if it fail.
    bool AddCharacter(std::unique_ptr<entity::Character> character); // Adds a character to characters_. Returns false if it fail.
    void removeEntities(); // Removes entities that should be removed

    std::vector<std::unique_ptr<entity::Entity> >::const_iterator IteratorAtBegin(QPoint a);
    std::vector<std::unique_ptr<entity::Entity> >::const_iterator IteratorAtEnd(QPoint a);
    std::vector<std::unique_ptr<entity::Character> >::const_iterator CharacterIteratorBegin();
    std::vector<std::unique_ptr<entity::Character> >::const_iterator CharacterIteratorEnd();

  private:
    const int width_; // Width of the world eg number of blocks
    const int height_;
    grid_t entities_;
    std::vector<std::unique_ptr<entity::Character> > characters_;
};

}

#endif
{'fraction_non_alphanumeric': 0.11431347150259068, 'fraction_numerical': 0.0, 'mean_word_length': 5.153386454183267, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, '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': '7176919', 'n_tokens_mistral': 925, 'n_tokens_neox': 901, 'n_words': 271}