Skip to content

Commit

Permalink
fixed check answer bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Yomi Eluwande committed Jul 24, 2017
1 parent fb7b96b commit 9ace8c0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -239,22 +239,22 @@
this.playerdata.two.score += 10
}
} else {
if (this.playerdata.one.score < 10) {
if (this.playerdata.one.score < 10 && this.playerdata.two.score === 0) {
if (this.userid === 1) {
this.playerdata.one.score = 0
} else if (this.userid === 2) {
this.playerdata.two.score = 0
}
} else if (this.playerdata.two.score < 10) {
} else if (this.playerdata.two.score < 10 && this.playerdata.one.score === 0) {
if (this.userid === 1) {
this.playerdata.one.score = 0
} else if (this.userid === 2) {
this.playerdata.two.score = 0
}
} else {
if (this.userid === 1) {
if (this.userid === 1 && this.playerdata.one.score > 0) {
this.playerdata.one.score -= 10
} else if (this.userid === 2) {
} else if (this.userid === 2 && this.playerdata.two.score > 0) {
this.playerdata.two.score -= 10
}
}
Expand Down

0 comments on commit 9ace8c0

Please sign in to comment.