Skip to content

Commit

Permalink
add turn-red and turn-blue on swap. Still jerks at class removal
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill-the-dev committed Feb 14, 2022
1 parent db893ad commit 87eac04
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 17 deletions.
4 changes: 2 additions & 2 deletions dist/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ body {
}

.turn-red {
animation: bg-animationBlue 5s;
animation: bg-animationRed 5s;
animation-fill-mode: forwards;
}

Expand All @@ -32,7 +32,7 @@ body {

@keyframes bg-animationRed {
100% {
background-position: left;
background-position: right;
}
}
@keyframes bg-animationBlue {
Expand Down
2 changes: 1 addition & 1 deletion dist/main.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions notes_bugs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
- HTML formatting not correct. Font issue? Pojo issue?


*Turn transition background*
- Start button template works! Now to figure out turn tracking to call red/blue alternate

*Turn transition card*
- Flip transluscent over to indicate blue/red turn. Above and below the onDeck.



Expand Down
9 changes: 8 additions & 1 deletion src/scripts/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,16 @@ export default class Game {

viewSwapTurn() {
let that = this;

// debugger
let playedCard = document.querySelector(".active-card");
let deckCard = document.querySelector("#back3");
let body = document.querySelector(".body");
if (that.currentPlayerIdx === 0) {
// body.classList.remove("turn-blue")
body.classList.add("turn-red");
} else {
body.classList.add("turn-blue")
}


// squares remove highlight
Expand Down
18 changes: 5 additions & 13 deletions src/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ body {
}

.turn-red {
animation: bg-animationBlue 5s;
animation: bg-animationRed 5s;
animation-fill-mode: forwards;
}

Expand All @@ -30,21 +30,13 @@ body {
}

@keyframes bg-animationRed {
0% {

}
100% {
background-position: left;
}
0% { }
100% { background-position: right; }
}

@keyframes bg-animationBlue {
0% {

}
100% {
background-position: left;
}
0% {}
100% { background-position: left; }
}

@keyframes bg-animationNull {
Expand Down

0 comments on commit 87eac04

Please sign in to comment.