From d73b534f681bfd51eb396e70236a752ea2dc9cfd Mon Sep 17 00:00:00 2001
From: Catalin Mititiuc
Date: Sat, 27 Apr 2024 08:18:47 -0700
Subject: Minor refactor
---
src/modules/game/sightLine.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'src/modules/game/sightLine.js')
diff --git a/src/modules/game/sightLine.js b/src/modules/game/sightLine.js
index 94e91e5..f5f52c0 100644
--- a/src/modules/game/sightLine.js
+++ b/src/modules/game/sightLine.js
@@ -95,7 +95,7 @@ function create({ x: x1, y: y1 }, { x: x2, y: y2 }) {
return sightLine;
}
-function lock(cell, sightLine, lockTarget) {
+function lock(sightLine, cell) {
sightLine.classList.remove(activeClassName);
cell.classList.add(targetClassName);
@@ -138,7 +138,7 @@ export default function (board) {
},
toggleLock: function (cell) {
- lockTarget = lockTarget ? unlock(sightLine, lockTarget) : lock(cell, sightLine, lockTarget);
+ lockTarget = lockTarget ? unlock(sightLine, lockTarget) : lock(sightLine, cell);
},
get sightLine() {
--
cgit v1.2.3