summaryrefslogtreecommitdiff
path: root/src/engine/turns.js
blob: 001841748989c9518e85d419ab51e69b3c71e40b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { PLAYER } from "../constants.js"
import { placeLinks } from "../engine/placeLinks.js"

export let playerTurn = ""

export function nextTurn() {
    changeTurn()
    placeLinks()
}

function changeTurn() {
    playerTurn = playerTurn == PLAYER.BLACK ? PLAYER.WHITE : PLAYER.BLACK
}