Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Elevista committed Jun 15, 2018
1 parent d7def11 commit 0bbd66e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/game2048/game2048.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
background: rgba(238, 228, 218, 0.73);
text-align: center;
}
.container .mid .message.win {
.container .mid .message.win:not(.gameover) {
background: rgba(237, 194, 46, 0.5);
color: #f9f6f2;
}
Expand Down
10 changes: 5 additions & 5 deletions app/game2048/game2048.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ <h1>2048</h1>
<tile v-for="item of tiles" :data="item" :game="game" :key="item.id"/>
</transition-group>
<div v-if="gameEnd" class="message" :class="state">
<div v-if="state.win" class="text">
You win!
</div>
<div v-else-if="state.gameover" class="text">
<div v-if="state.gameover" class="text">
Game over!
</div>
<div v-else-if="state.win" class="text">
You win!
</div>
<div class="btns">
<button @click="restart">Try again</button>
<button v-if="state.win" @click="keepGoing">Keep going</button>
<button v-if="state.win&&!state.keepGoing" @click="keepGoing">Keep going</button>
</div>
</div>
</div>
Expand Down

0 comments on commit 0bbd66e

Please sign in to comment.