Update code.js
This commit is contained in:
parent
a751e79b29
commit
b89baae053
24
src/code.js
24
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
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user