summaryrefslogtreecommitdiff
path: root/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.js')
-rwxr-xr-xsrc/index.js27
1 files changed, 2 insertions, 25 deletions
diff --git a/src/index.js b/src/index.js
index 8af22e7..70c9695 100755
--- a/src/index.js
+++ b/src/index.js
@@ -1,34 +1,11 @@
-import { board, prepareBoard } from "./board.js"
-import { Vector2 } from "./engine/visual.js"
-import { Stone } from "./stones.js"
+import { prepareBoard } from "./board.js"
+import { nextTurn } from "./engine/turns.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()