Skip to content

Commit

Permalink
[Auto-format code on push]
Browse files Browse the repository at this point in the history
  • Loading branch information
format.yml committed Jul 1, 2023
1 parent 95f6103 commit c36ab0e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions public/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit c36ab0e

Please sign in to comment.