#pragma once #include #include #include "engine/data/vector2.hpp" #include "interfaces/cell_helper.hpp" #include "interfaces/matrix.hpp" template class CellHelper : public ICellHelper { public: explicit CellHelper(std::shared_ptr> matrix) noexcept; [[nodiscard]] auto compute_is_cell_dying(const Vector2 &cell_pos) const noexcept -> bool override; [[nodiscard]] auto compute_birth_cell_positions( const std::vector &cell_positions) const noexcept -> std::vector override; private: const std::shared_ptr> _matrix; [[nodiscard]] auto _get_valid_pos_neighbours(const Vector2 &position) const noexcept -> std::vector; }; #include "cell_helper_impl.hpp"