From 2303968dc24664d1fb4383d019420e7ddcf06b8a Mon Sep 17 00:00:00 2001 From: nil Date: Wed, 18 Dec 2024 17:53:17 +0100 Subject: progress --- src/engine/turns.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/engine/turns.js') 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() } -- cgit v1.2.3