baba-is-auto
C++17 Baba Is You simulator
Loading...
Searching...
No Matches
RuleManager.hpp
Go to the documentation of this file.
1// Copyright (c) 2020-2026 Chris Ohk
2
3// I am making my contributions/submissions to this project solely in our
4// personal capacity and am not conveying any rights to any intellectual
5// property of any third parties.
6
7#ifndef BABA_IS_AUTO_RULE_MANAGER_HPP
8#define BABA_IS_AUTO_RULE_MANAGER_HPP
9
11
12#include <vector>
13
14namespace baba_is_auto
15{
22{
23 public:
26 void AddRule(const Rule& rule);
27
30 void RemoveRule(const Rule& rule);
31
33 void ClearRules();
34
38 std::vector<Rule> GetRules(ObjectType type) const;
39
42 std::size_t GetNumRules() const;
43
47
52 bool HasProperty(const std::vector<ObjectType>& types, ObjectType property);
53
54 private:
55 std::vector<Rule> m_rules;
56};
57} // namespace baba_is_auto
58
59#endif
RuleManager class.
Definition RuleManager.hpp:22
std::vector< Rule > GetRules(ObjectType type) const
std::size_t GetNumRules() const
void ClearRules()
Clears a list of rules.
void AddRule(const Rule &rule)
void RemoveRule(const Rule &rule)
ObjectType FindPlayer() const
bool HasProperty(const std::vector< ObjectType > &types, ObjectType property)
Rule class.
Definition Rule.hpp:24
Definition IAgent.hpp:14
ObjectType
An enumerator for identifying the object.
Definition GameEnums.hpp:14