Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/game/sightLine.js')
-rw-r--r--src/modules/game/sightLine.js4
1 files changed, 2 insertions, 2 deletions
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() {