blob: 141d90504c7eed1148d1f5d6da324454fd6af84e (
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
35
36
37
|
#pragma once
#include "interfaces/matrix.hpp"
#include "engine/data/vector2.hpp"
#include <yacppdic/factory.hpp>
#include <list>
#include <memory>
// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions)
class ICellHelper
{
public:
virtual ~ICellHelper() noexcept = default;
[[nodiscard]] virtual auto is_cell_dying(const Vector2 &cell_pos) const noexcept
-> bool = 0;
[[nodiscard]] virtual auto
get_birth_cell_positions(const std::list<Vector2> &cell_positions) const noexcept
-> std::list<Vector2> = 0;
/*
[[nodiscard]] virtual auto
find_neighbour_cells(const Vector2 &cell_pos) const noexcept
-> std::list<Vector2> = 0;
*/
[[nodiscard]] virtual auto find_neighbours(const Vector2 &cell_pos) const noexcept
-> std::list<Vector2> = 0;
};
template <typename MatrixElement>
using ICellHelperFactory =
yacppdic::Factory<std::unique_ptr<ICellHelper>(const IMatrix<MatrixElement> &matrix)>;
|