From c36ab0e53b705148a201b3a015f5a869826e0d58 Mon Sep 17 00:00:00 2001 From: "format.yml" Date: Sat, 1 Jul 2023 15:16:05 +0000 Subject: [PATCH] [Auto-format code on push] --- public/script.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/public/script.js b/public/script.js index cad437b..f599e84 100644 --- a/public/script.js +++ b/public/script.js @@ -81,10 +81,11 @@ htmlPlayerSelect.addEventListener('change', () => { setNewGame('New game, you are playing as O'); const moves = game.computerAutoPlay( - (typeof htmlDepthInput.value === 'number' || typeof htmlDepthInput.value === 'string') ? - Number(htmlDepthInput.value) : 1 + typeof htmlDepthInput.value === 'number' || typeof htmlDepthInput.value === 'string' + ? Number(htmlDepthInput.value) + : 1 ); - + for (let move of moves) { // works but instantanously, not as intended, // fix this later and make it look real time updates. @@ -177,10 +178,11 @@ function setNewGame(msg = '') { if (htmlPlayerSelect.value === '0') { const moves = game.computerAutoPlay( - (typeof htmlDepthInput.value === 'number' || typeof htmlDepthInput.value === 'string') ? - Number(htmlDepthInput.value) : 1 + typeof htmlDepthInput.value === 'number' || typeof htmlDepthInput.value === 'string' + ? Number(htmlDepthInput.value) + : 1 ); - + for (let move of moves) { // works but instantanously, not as intended, // fix this later and make it look real time updates.