diff --git a/src/code.js b/src/code.js index ca4f667..1704026 100644 --- a/src/code.js +++ b/src/code.js @@ -1,8 +1,20 @@ var board = [ - [0, 0, 0], - [0, 0, 0], - [0, 0, 0] + [ + [0, document.getElementById("00")], + [0, document.getElementById("01")], + [0, document.getElementById("02")] + ], + [ + [0, document.getElementById("10")], + [0, document.getElementById("11")], + [0, document.getElementById("12")] + ], + [ + [0, document.getElementById("20")], + [0, document.getElementById("21")], + [0, document.getElementById("22")] + ] ]; var ptm = 1; @@ -15,12 +27,10 @@ function move(id) { charater = "X" } - else if (ptm === 2) + else (ptm === 2) { charater = "O" } - else - { - } + } \ No newline at end of file