Fix randomness when >= 2 rematch games
authorBenjamin Auder <benjamin.auder@somewhere>
Fri, 19 Jun 2020 14:05:14 +0000 (16:05 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Fri, 19 Jun 2020 14:05:14 +0000 (16:05 +0200)
client/src/views/Game.vue

index d6667f7..6570cb7 100644 (file)
@@ -1056,6 +1056,7 @@ console.log(data.data);
         let gameInfo = {
           id: getRandString(), //ignored if corr
           fen: V.GenRandInitFen(this.game.randomness),
+          randomness: this.game.randomness,
           players: [this.game.players[1], this.game.players[0]],
           vid: this.game.vid,
           cadence: this.game.cadence
@@ -1077,7 +1078,6 @@ console.log(data.data);
             "/games",
             "POST",
             {
-              // cid is useful to delete the challenge:
               data: { gameInfo: gameInfo },
               success: (response) => {
                 gameInfo.id = response.gameId;