summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
)
}