summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornil <niljo@airmail.cc>2024-12-13 16:48:06 +0100
committernil <niljo@airmail.cc>2024-12-13 16:48:06 +0100
commit99c5056ffc4adec03f29730869158e5f80bc4304 (patch)
treec3556f981f9daf238594d623dbec113f40bf4962
parentcec1da14708e782801d0cc27fb13ff7586c0e96c (diff)
quickfix
-rw-r--r--src/engine/liberty.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/engine/liberty.js b/src/engine/liberty.js
index 372057e..a006c62 100644
--- a/src/engine/liberty.js
+++ b/src/engine/liberty.js
@@ -17,8 +17,8 @@ export function hasLiberties({
.filter(z => 0 <= z.x && z.x < board.size &&
0 <= z.y && z.y < board.size
)
- .some(z => board.stones[z.x][z.y] == undefined ?
+ .some(z => board.stones[z.y][z.x] == undefined ?
true :
- board.stones[z.x][z.y].team == team
+ board.stones[z.y][z.x].team == team
)
}