From c17df7d3e28e0eeb21f7a62d1c66f525b487a5fa Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Sat, 2 Nov 2024 18:46:18 +0100 Subject: implement dungeon generation --- backend/Location.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'backend/Location.cpp') 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((rhs + 2) % 4); +} + Direction random_direction() { return DIRECTIONS[RNG::get().rand_int(4)]; } -- cgit v1.2.3