From 43f4ea5f1fba5d160fbb078d86e04277ecde7f2b Mon Sep 17 00:00:00 2001 From: DrPerkyLegit Date: Sat, 23 May 2026 10:27:20 -0400 Subject: [PATCH] update facing.cpp --- Minecraft.World/Facing.cpp | 7 ++++++- Minecraft.World/Facing.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Minecraft.World/Facing.cpp b/Minecraft.World/Facing.cpp index 33742e9..b6bb931 100644 --- a/Minecraft.World/Facing.cpp +++ b/Minecraft.World/Facing.cpp @@ -21,4 +21,9 @@ const int Facing::STEP_Z[6] = 0, 0, -1, 1, 0, 0 }; -const wstring Facing::NAMES[] = {L"DOWN", L"UP", L"NORTH", L"SOUTH", L"WEST", L"EAST"}; \ No newline at end of file +const wstring Facing::NAMES[] = {L"DOWN", L"UP", L"NORTH", L"SOUTH", L"WEST", L"EAST"}; + +int Facing::getOpposite(int facing) +{ + return OPPOSITE_FACING[facing]; +} \ No newline at end of file diff --git a/Minecraft.World/Facing.h b/Minecraft.World/Facing.h index b257e4b..922bd9d 100644 --- a/Minecraft.World/Facing.h +++ b/Minecraft.World/Facing.h @@ -16,4 +16,5 @@ public: static const int STEP_Z[6]; static const wstring NAMES[]; + static int getOpposite(int facing); }; \ No newline at end of file