save steps and point info to db
This commit is contained in:
@@ -144,11 +144,25 @@ class MineSeeker extends React.Component {
|
||||
if (activePlayer === this.refs.gridControl.state.webPlayer) {
|
||||
this.refs.gridControl.stepEvent(coords);
|
||||
|
||||
var mineCache = this.refs.gridControl.state.foundUserMineCache,
|
||||
redPoints = this.refs.gridControl.refs.userControl.refs.red.state.mines + (
|
||||
this.refs.gridControl.refs.userControl.refs.red.state.active
|
||||
? mineCache
|
||||
: 0
|
||||
),
|
||||
bluePoints = this.refs.gridControl.refs.userControl.refs.blue.state.mines + (
|
||||
this.refs.gridControl.refs.userControl.refs.blue.state.active
|
||||
? mineCache
|
||||
: 0
|
||||
);
|
||||
|
||||
this.state.session
|
||||
.publish(this.state.channel, {
|
||||
'coords': coords,
|
||||
'player': activePlayer,
|
||||
'bomb': this.refs.gridControl.refs.userControl.state.bombSelected
|
||||
'bomb': this.refs.gridControl.refs.userControl.state.bombSelected,
|
||||
'redPoints': redPoints,
|
||||
'bluePoints': bluePoints
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user