summaryrefslogtreecommitdiff
path: root/src/index.js
diff options
context:
space:
mode:
authorniliara-edu <nil.jimeno@estudiant.fjaverianas.com>2024-12-11 09:38:08 +0100
committerniliara-edu <nil.jimeno@estudiant.fjaverianas.com>2024-12-11 09:38:08 +0100
commitfa377bcc6d4793dcd79ae5c07a43a1193aa2613a (patch)
tree44aa34937b3f79d6665a71955ed9e353438417e7 /src/index.js
parenteac306447294863b3c5591c2f51b1e76bd257de1 (diff)
changes go brrr
Diffstat (limited to 'src/index.js')
-rwxr-xr-xsrc/index.js8
1 files changed, 6 insertions, 2 deletions
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,