#pragma once

#include <vectors/vec2.h>
#include <set>
#include "entity/enemy.hpp"

namespace game {

class World;

class Block
{
private:
    const vec2f size{30, 17};
    const float speed = 4;
    bool isMoving = true;
    vec2f position;

    std::set<entity::Enemy*> enemies;

    World *world;

public:
    Block(const vec2f &position, World *world) noexcept;
    ~Block();

    bool IsLeftScreen() const noexcept;
    bool IsStoped() const noexcept;

    void AddEnemy(entity::Enemy *enemy) noexcept;
    void RemoveEnemy(entity::Enemy *enemy) noexcept;

    World *GetWorld() const noexcept;

    vec2f GetPosition() const noexcept;

    void Update(bool moving) noexcept;
};

}
