11 for (std::size_t i = 0; i <
kLands.size(); ++i) {
12 if (
kLands[i].name == name) {
13 return static_cast<int>(i);
21 if (land.name == name) {
34 return *std::ranges::find_if(
kGates, [&gate](
const Gate& other) {
45 return {.x = twin.
x +
kArrival * std::sin(yaw),
constexpr std::array< Gate, 4 > kGates
const Gate & WayOut(int dungeon)
The dungeon's way out: its first gate.
const Gate & Twin(const Gate &gate)
The gate in the land this one takes you to, which leads back.
int LandNamed(std::string_view name)
Its place in the list, or the first land's for a name that isn't there.
constexpr float kArrival
Past the edge of a gate, so that players don't arrive inside it.
Place Arrival(const Gate &gate, float yaw)
bool InGate(const Gate &gate, float x, float z)
constexpr std::array< Land, 3 > kLands
constexpr float kGateRadius
In metres from the middle of a gate.
bool IsLand(std::string_view name)
A ring of stones in a land, which takes players to another.
int land
Where it stands, and the land it takes you to, by their places in kLands.
In metres from the middle of a land.