Skip to content

Commit

Permalink
removed unnecessary parentheses
Browse files Browse the repository at this point in the history
  • Loading branch information
jasger9000 committed Jan 31, 2024
1 parent 9f06732 commit 6369879
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions assets/scripts/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ function deleteLetter () {
// CHECK IF GUESS IS CORRECT

function guessPreprocess(){
if ((lastActiveWord != null) && (activeWord==null)) {
if (lastActiveWord != null && activeWord==null) {
activeWord = lastActiveWord;
checkGuess()
return;
Expand Down Expand Up @@ -295,10 +295,10 @@ function updatePlayer(playerLst, activePlayer) {
}

playerLst.forEach((player) => {
if ((!player[0].classList.contains("submitted")) && player[0] != activePlayer[0]) {
if (!player[0].classList.contains("submitted") && player[0] != activePlayer[0]) {
player[0].classList.remove("clicked", "fa-circle-stop");
stopSound(player[1]);
} else if ((!player[0].classList.contains("submitted")) && player[0] == activePlayer[0]) {
} else if (!player[0].classList.contains("submitted") && player[0] == activePlayer[0]) {
activePlayer[0].classList.add("clicked","fa-circle-stop");
activePlayer[1].play();
}
Expand Down
6 changes: 3 additions & 3 deletions assets/scripts/practice.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function deleteLetter () {
}

function guessPreprocess() {
if ((lastActiveWord != null) && (activeWord==null)) {
if (lastActiveWord != null && activeWord==null) {
activeWord = lastActiveWord;
checkGuess()
return;
Expand Down Expand Up @@ -204,10 +204,10 @@ function updatePlayer(playerLst, activePlayer) {
}

playerLst.forEach((player) => {
if ((!player[0].classList.contains("submitted")) && player[0] != activePlayer[0]) {
if (!player[0].classList.contains("submitted") && player[0] != activePlayer[0]) {
player[0].classList.remove("clicked", "fa-circle-stop");
stopSound(player[1]);
} else if ((!player[0].classList.contains("submitted")) && player[0] == activePlayer[0]) {
} else if (!player[0].classList.contains("submitted") && player[0] == activePlayer[0]) {
activePlayer[0].classList.add("clicked","fa-circle-stop");
activePlayer[1].play();
}
Expand Down
6 changes: 3 additions & 3 deletions assets/scripts/spelloff.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function deleteLetter () {
}

function guessPreprocess() {
if ((lastActiveWord != null) && (activeWord==null)) {
if (lastActiveWord != null && activeWord==null) {
activeWord = lastActiveWord;
checkGuess()
return;
Expand Down Expand Up @@ -188,10 +188,10 @@ function updatePlayer(playerLst, activePlayer) {
}

playerLst.forEach((player) => {
if ((!player[0].classList.contains("submitted")) && player[0] != activePlayer[0]) {
if (!player[0].classList.contains("submitted") && player[0] != activePlayer[0]) {
player[0].classList.remove("clicked", "fa-circle-stop");
stopSound(player[1]);
} else if ((!player[0].classList.contains("submitted")) && player[0] == activePlayer[0]) {
} else if (!player[0].classList.contains("submitted") && player[0] == activePlayer[0]) {
activePlayer[0].classList.add("clicked","fa-circle-stop");
activePlayer[1].play();
}
Expand Down
6 changes: 3 additions & 3 deletions assets/scripts/wordLstGenerator.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions assets/scripts/youtube.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ function checkLevel(level){
function updateWord(){
if (wordCounter < 10){
levelPath = "levelOneNEW"
} else if ((wordCounter >= 10) && (wordCounter<20)){
} else if (wordCounter >= 10 && wordCounter<20){
levelPath = "levelTwoNEW"
}else if ((wordCounter >= 20) && (wordCounter<100)){
}else if (wordCounter >= 20 && wordCounter<100){
levelPath = "levelThreeNEW"
}
wordLst = genYoutubeWordLst()
Expand Down Expand Up @@ -118,7 +118,7 @@ function deleteLetter () {
}

function guessPreprocess() {
if ((lastActiveWord != null) && (activeWord==null)) {
if (lastActiveWord != null && activeWord==null) {
activeWord = lastActiveWord;
checkGuess()
return;
Expand Down Expand Up @@ -179,10 +179,10 @@ function updatePlayer(playerLst, activePlayer) {
}

playerLst.forEach((player) => {
if ((!player[0].classList.contains("submitted")) && player[0] != activePlayer[0]) {
if (!player[0].classList.contains("submitted") && player[0] != activePlayer[0]) {
player[0].classList.remove("clicked", "fa-circle-stop");
stopSound(player[1]);
} else if ((!player[0].classList.contains("submitted")) && player[0] == activePlayer[0]) {
} else if (!player[0].classList.contains("submitted") && player[0] == activePlayer[0]) {
activePlayer[0].classList.add("clicked","fa-circle-stop");
activePlayer[1].play();
}
Expand Down

0 comments on commit 6369879

Please sign in to comment.