diff options
author | nil <niljo@airmail.cc> | 2024-12-18 17:53:17 +0100 |
---|---|---|
committer | nil <niljo@airmail.cc> | 2024-12-18 17:53:17 +0100 |
commit | 2303968dc24664d1fb4383d019420e7ddcf06b8a (patch) | |
tree | dfd0193a6cc1178c193ed1c6ccce0c427cf4f0fd /src/engine/turns.js | |
parent | 7b005bc02b1e73c71f8cb8f4e03b6fe6ff420c67 (diff) |
Diffstat (limited to 'src/engine/turns.js')
-rw-r--r-- | src/engine/turns.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/engine/turns.js b/src/engine/turns.js index 0018417..0906932 100644 --- a/src/engine/turns.js +++ b/src/engine/turns.js @@ -1,10 +1,16 @@ import { PLAYER } from "../constants.js" import { placeLinks } from "../engine/placeLinks.js" +import { removeDeadStones } from "../engine/death.js" -export let playerTurn = "" +export let playerTurn = "black" -export function nextTurn() { +export function nextTurn({move = null}) { + if (move != null) removeDeadStones(move) changeTurn() + startTurn() +} + +export function startTurn() { placeLinks() } |