diff --git a/src/code.js b/src/code.js index 756f2f8..42c882d 100644 --- a/src/code.js +++ b/src/code.js @@ -32,13 +32,23 @@ function move(id) score[winner - 1]++; info['score'].innerHTML = score[0] + " | " + score[1]; + + tabloid.classList.add('win'); + } + else + { + tabloid.classList.add('lol') } info['go'] = "X's Go"; ptm = 1; - reset(); + setTimeout(function () + { + reset(); + }, 1500); + return; } @@ -148,4 +158,7 @@ function reset() board[x][y][1].innerHTML = " "; } } + + tabloid.classList.remove('win'); + tabloid.classList.remove('lol'); } \ No newline at end of file diff --git a/src/style.css b/src/style.css index e7666bd..ba80b5e 100644 --- a/src/style.css +++ b/src/style.css @@ -16,13 +16,16 @@ * { - background-color: #231F20; - color: white; font-family: 'Roboto', sans-serif; } +body +{ + background-color: #231F20; +} + button { height: 75px; @@ -42,4 +45,11 @@ button { height: 50px; width: 150px; +} + +.win +{ + border-radius: 12px; + + background-color: #9DB17C; } \ No newline at end of file diff --git a/src/var.js b/src/var.js index 7256c6e..62b08ec 100644 --- a/src/var.js +++ b/src/var.js @@ -3,6 +3,7 @@ var info; var score; var ids; var ptm; +var tabloid; function load() { @@ -53,4 +54,6 @@ function load() }; ptm = 1; + + tabloid = document.getElementById('board'); } \ No newline at end of file