From fa377bcc6d4793dcd79ae5c07a43a1193aa2613a Mon Sep 17 00:00:00 2001 From: niliara-edu Date: Wed, 11 Dec 2024 09:38:08 +0100 Subject: changes go brrr --- src/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/index.js') diff --git a/src/index.js b/src/index.js index cde047f..8af22e7 100755 --- a/src/index.js +++ b/src/index.js @@ -10,15 +10,19 @@ function start() { } 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++) { - placeLink(new Vector2(row, col)) + tryLink(new Vector2(row, col)) } } } -function placeLink(position) { +function tryLink(position) { console.log("link to", position.x, position.y) new Stone({ position: position, -- cgit v1.2.3