diff options
Diffstat (limited to 'src/index.js')
-rwxr-xr-x | src/index.js | 8 |
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, |