import { board, prepareBoard } from "./board.js" import { Vector2 } from "./engine/visual.js" import { Stone } from "./stones.js" let turn = "" function start() { prepareBoard() nextTurn() } function nextTurn() { placeLinks() } function placeLinks() { turn = turn != "black" ? turn = "black" : turn = "white" for (let row = 0; row < board.size; row++) { for (let col = 0; col < board.size; col++) { tryLink(new Vector2(row, col)) } } } function tryLink(position) { console.log("link to", position.x, position.y) new Stone({ position: position, team: (position.x + position.y) % 2 ? "white" : "black" }) } start()