diff options
author | nil <niljo@airmail.cc> | 2024-12-12 18:20:22 +0100 |
---|---|---|
committer | nil <niljo@airmail.cc> | 2024-12-12 18:20:22 +0100 |
commit | 16e02376e2273eeb25a6461f84641e96a485f652 (patch) | |
tree | 64a1deee7d8fdfda0a75475642364fc1ba4d8500 /src/engine/moves.js | |
parent | 8a49fc718cbfebe593d18dcf37fef2a19f3aa570 (diff) |
add legal movements and organize
Diffstat (limited to 'src/engine/moves.js')
-rw-r--r-- | src/engine/moves.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/engine/moves.js b/src/engine/moves.js new file mode 100644 index 0000000..f820f97 --- /dev/null +++ b/src/engine/moves.js @@ -0,0 +1,11 @@ +import { board } from "../board.js" + +export function isMoveLegal({ + position, + turn = "none" +}) { + if (board.stones[position.y][position.x] != undefined) { + return false + } + return true +} |