#pragma once

#include <cstdint>
#include "def.h"

namespace game
{

class cell
{
friend class level;
public:
    cell() = default;
    ~cell() = default;

    bool isFree();

    void set(entity*, bool primary);

    void destroy();
    void free();
    cell *sibling(uint32_t);

    entity *get();

    void draw();
private:
    cell *_siblings[4];
    level *_root;
    entity *_entity = 0;
    bool _primary = 0;

};

}
