aboutsummaryrefslogtreecommitdiff
path: root/backend/Location.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-02 18:46:18 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-02 18:46:18 +0100
commitc17df7d3e28e0eeb21f7a62d1c66f525b487a5fa (patch)
tree897cc608add9682c0ae36d3b3552147706234602 /backend/Location.cpp
parent5e4dd0c0197f6273c61491a5b9a030c93f796a12 (diff)
implement dungeon generation
Diffstat (limited to 'backend/Location.cpp')
-rw-r--r--backend/Location.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/backend/Location.cpp b/backend/Location.cpp
index c036c7b..eadbef2 100644
--- a/backend/Location.cpp
+++ b/backend/Location.cpp
@@ -5,6 +5,10 @@
#include "Object.h"
#include "util.h"
+Direction operator - (const Direction & rhs) {
+ return static_cast<Direction>((rhs + 2) % 4);
+}
+
Direction random_direction() {
return DIRECTIONS[RNG::get().rand_int(4)];
}