- this.game.clocks = data.clocks;
- this.drawOffer = data.drawOffer;
- }
- else if (data.movesCount < L)
- {
- // We must tell last move to opponent
- this.st.conn.send(JSON.stringify({
- code: "lastate",
- target: this.getOppSid(), //we know he is connected
- gameId: this.gameRef.id,
- lastMove: (L>0 ? this.game.moves[L-1] : undefined),
- score: this.game.score,
- movesCount: L,
- drawOffer: this.drawOffer,
- clocks: this.game.clocks,
- }));
+ this.game.clocks = data.clocks; //TODO: check this?
+ this.drawOffer = data.drawOffer; //does opponent offer draw?