From 2bf62722917b571b189f7984bfdae010746f5a44 Mon Sep 17 00:00:00 2001 From: Kim Ravn Hansen Date: Sat, 4 Oct 2025 17:15:56 +0200 Subject: [PATCH] Correct direction vs orientation --- frontend/ascii_dungeon_crawler.js | 4 ++-- frontend/ascii_types.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/ascii_dungeon_crawler.js b/frontend/ascii_dungeon_crawler.js index b513ff0..49e2b3c 100755 --- a/frontend/ascii_dungeon_crawler.js +++ b/frontend/ascii_dungeon_crawler.js @@ -49,7 +49,7 @@ class Player { return; } if (o === Orientation.NORTH) { - this._directionV = new Vector2i(0, 1); + this._directionV = new Vector2i(0, -1); return; } if (o === Orientation.WEST) { @@ -57,7 +57,7 @@ class Player { return; } if (o === Orientation.SOUTH) { - this._directionV = new Vector2i(0, -1); + this._directionV = new Vector2i(0, 1); return; } } diff --git a/frontend/ascii_types.js b/frontend/ascii_types.js index 65bf4bd..518c918 100755 --- a/frontend/ascii_types.js +++ b/frontend/ascii_types.js @@ -6,11 +6,11 @@ export const PI_OVER_TWO = Math.PI / 2; */ export const Orientation = { /** @constant @readonly @type {number} */ - WEST: 0, + EAST: 0, /** @constant @readonly @type {number} */ SOUTH: 1, /** @constant @readonly @type {number} */ - EAST: 2, + WEST: 2, /** @constant @readonly @type {number} */ NORTH: 3, };