From bb1779187f661322674ef3b1a1b8cb77d438de4f Mon Sep 17 00:00:00 2001 From: AUnicornWithNoLife Date: Sun, 11 Apr 2021 21:00:58 +0100 Subject: [PATCH] switches --- src/code.js | 14 +++++++++----- src/index.html | 18 +++++++++--------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/code.js b/src/code.js index 5020bdc..0a8ff9d 100644 --- a/src/code.js +++ b/src/code.js @@ -35,7 +35,7 @@ var ids = '20': [2, 0], '21': [2, 1], '22': [2, 2] -} +}; var ptm = 1; @@ -43,13 +43,17 @@ function move(id) { var charater = ""; - if (ptm === 1) + if (ptm == 1) { - charater = "X" + charater = "X"; + + ptm = 2; } - else (ptm === 2) + else { - charater = "O" + charater = "O"; + + ptm = 1; } board[ids[id][0]][ids[id][1]][1].innerHTML = charater; diff --git a/src/index.html b/src/index.html index c905328..f99e41b 100644 --- a/src/index.html +++ b/src/index.html @@ -14,19 +14,19 @@ - - - + + + - - - + + + - - - + + +