#pragma once

#include <memory>

#include "game/engendro.hpp"
#include "game/info.hpp"
#include "game/prota.hpp"
#include "game/sprite.hpp"

class Momia : public Sprite {
   public:
    explicit Momia(Jd8::Surface gfx, bool dimoni, Uint16 x, Uint16 y, Prota* sam);

    void draw() override;
    auto update() -> bool;

    bool dimoni;

   protected:
    Prota* sam_;
    std::unique_ptr<Engendro> engendro_;

    void pickDirection();
    void pickHorizontalThenVertical();
    void pickVerticalThenHorizontal();
    void stepInDirection();
    [[nodiscard]] auto collidesWithSam() const -> bool;
    void applyCollisionWithSam();
};
