diff options
author | HampusM <hampus@hampusmat.com> | 2022-07-01 16:27:15 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-07-01 16:27:15 +0200 |
commit | 0fca054fdc11dba086541e2d5a48f6f1406925dd (patch) | |
tree | bbb7e693c7c71122c0c12970a659d39081a544fd /src/game/cell_helper.hpp | |
parent | 7307815e99a79dac42f2a9c06b0fe6171ea11ba0 (diff) |
refactor: clarify cell helper method names
Diffstat (limited to 'src/game/cell_helper.hpp')
-rw-r--r-- | src/game/cell_helper.hpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/game/cell_helper.hpp b/src/game/cell_helper.hpp index c54b12e..0439269 100644 --- a/src/game/cell_helper.hpp +++ b/src/game/cell_helper.hpp @@ -1,33 +1,29 @@ #pragma once -#include "interfaces/cell_helper.hpp" -#include "interfaces/matrix.hpp" - -#include "engine/data/vector2.hpp" - #include <memory> #include <vector> +#include "engine/data/vector2.hpp" +#include "interfaces/cell_helper.hpp" +#include "interfaces/matrix.hpp" + template <typename MatrixElement> class CellHelper : public ICellHelper { public: explicit CellHelper(std::shared_ptr<IMatrix<MatrixElement>> matrix) noexcept; - [[nodiscard]] auto is_cell_dying(const Vector2 &cell_pos) const noexcept + [[nodiscard]] auto compute_is_cell_dying(const Vector2 &cell_pos) const noexcept -> bool override; - [[nodiscard]] auto - get_birth_cell_positions(const std::vector<Vector2> &cell_positions) const noexcept - -> std::vector<Vector2> override; - - [[nodiscard]] auto find_neighbours(const Vector2 &cell_pos) const noexcept + [[nodiscard]] auto compute_birth_cell_positions( + const std::vector<Vector2> &cell_positions) const noexcept -> std::vector<Vector2> override; private: const std::shared_ptr<IMatrix<MatrixElement>> _matrix; - static auto _get_position_neighbours(const Vector2 &position) noexcept + [[nodiscard]] auto _get_valid_pos_neighbours(const Vector2 &position) const noexcept -> std::vector<Vector2>; }; |