blob: f76497a15d9397e92bd39c1afb3d4b76ca74e952 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#pragma once
#include "interfaces/cell_helper.hpp"
#include "interfaces/matrix.hpp"
#include "engine/data/vector2.hpp"
#include <list>
#include <memory>
template <typename MatrixElement>
class CellHelper : public ICellHelper
{
public:
explicit CellHelper(const IMatrix<MatrixElement> &matrix) noexcept;
[[nodiscard]] auto is_cell_dying(const Vector2 &cell_pos) const noexcept
-> bool override;
[[nodiscard]] auto
get_birth_cell_positions(const std::list<Vector2> &cell_positions) const noexcept
-> std::list<Vector2> override;
[[nodiscard]] auto find_neighbours(const Vector2 &cell_pos) const noexcept
-> std::list<Vector2> override;
private:
const IMatrix<MatrixElement> &_matrix;
static auto _get_position_neighbours(const Vector2 &position) noexcept
-> std::list<Vector2>;
};
#include "cell_helper_impl.hpp"
|