diff --git a/src/Mine/SeekerBundle/Resources/public/js/mine-seeker/grid/grid-control.js b/src/Mine/SeekerBundle/Resources/public/js/mine-seeker/grid/grid-control.js index 413c8dc..0e9b87d 100644 --- a/src/Mine/SeekerBundle/Resources/public/js/mine-seeker/grid/grid-control.js +++ b/src/Mine/SeekerBundle/Resources/public/js/mine-seeker/grid/grid-control.js @@ -352,11 +352,17 @@ class GridControl extends React.Component { */ onHoverWithBomb(coords) { if (this.refs.userControl.state.bombSelected) { - /** clear cache, reset symbols */ - this.bombClear(); + var activePlayer = this.refs.userControl.state.activePlayer ? 'blue' : 'red'; - /** new cache && field activate */ - this.bombCreate(coords[0], coords[1]); + if (activePlayer === this.state.webPlayer) { + /** clear cache, reset symbols */ + this.bombClear(); + + /** new cache && field activate */ + this.bombCreate(coords[0], coords[1]); + } else { + this.refs.userControl.setState({bombSelected: false}); + } } } diff --git a/src/Mine/SeekerBundle/Resources/public/js/mine-seeker/grid/grid-field.js b/src/Mine/SeekerBundle/Resources/public/js/mine-seeker/grid/grid-field.js index 69ab29e..ecd0a39 100644 --- a/src/Mine/SeekerBundle/Resources/public/js/mine-seeker/grid/grid-field.js +++ b/src/Mine/SeekerBundle/Resources/public/js/mine-seeker/grid/grid-field.js @@ -35,8 +35,6 @@ class GridField extends React.Component { componentWillMount() { var wave = Math.floor(Math.random() * 3) + 1; - console.log('mounted'); - this.setState({ currentImage: this.state.icons.root + this.state.icons.water[wave] });