about summary refs log tree commit diff stats
path: root/src/tracker_state.h
blob: c7857a075d18a50611f1601b9cd84fb1e4e4fd40 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef TRACKER_STATE_H_8639BC90
#define TRACKER_STATE_H_8639BC90

#include <map>
#include <string>

void ResetReachabilityRequirements();

void RecalculateReachability();

bool IsLocationReachable(int location_id);

bool IsDoorOpen(int door_id);

bool IsPaintingReachable(int painting_id);

const std::map<std::string, bool>& GetDoorRequirements(int door_id);

#endif /* end of include guard: TRACKER_STATE_H_8639BC90 */
n class="w"> major(major_arg), minor(minor_arg), revision(rev_arg) {} Version(const std::string& ver_str) { const std::regex version_regex("v([0-9]*)\.([0-9]*)\.([0-9]*)"); std::smatch version_match; if (std::regex_match(ver_str, version_match, version_regex)) { major = std::atoi(version_match[1].str().c_str()); minor = std::atoi(version_match[2].str().c_str()); revision = std::atoi(version_match[3].str().c_str()); } } bool operator<(const Version& rhs) const { return (major < rhs.major) || (major == rhs.major && (minor < rhs.minor || (minor == rhs.minor && revision < rhs.revision))); } }; std::ostream& operator<<(std::ostream& out, const Version& ver) { return out << "v" << ver.major << "." << ver.minor << "." << ver.revision; } constexpr const Version kTrackerVersion = Version(0, 5, 1); #endif /* end of include guard: VERSION_H_C757E53C */