Skip to content

Commit

Permalink
Prevent socket emit if field is already won
Browse files Browse the repository at this point in the history
  • Loading branch information
dazorni committed May 31, 2016
1 parent b7dda2b commit 0653bab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/component/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ class Game extends React.Component {
return;
}

if (this.state.fields && this.state.fields[field] && this.state.fields[field].won) {
return;
}

if (this.state.isNextFieldRandom == false && this.state.nextField != field) {
return;
}
Expand Down

0 comments on commit 0653bab

Please sign in to comment.