// TODO: this will be a component instead ?
// If simultaneous games, no "rematch" button
+// simult : open connexion to rooms from list, in all (if I'm the "simultaneer" --> TODO: indicate sid + side [random,white, black] in challenge)
+// if I'm just one of the players (one game), just one game.
+// view "Game_s", with pug list of components Game.
+// generally only one element, unless I'm the simultaneer.
+// Add messages ?
+
import BaseGame from "@/components/BaseGame.vue";
import UserBio from "@/components/UserBio.vue";
import Chat from "@/components/Chat.vue";
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
"/games",
"POST",
{
- // cid is useful to delete the challenge:
data: { gameInfo: gameInfo },
success: (response) => {
gameInfo.id = response.gameId;
};
if (
this.game.type == "corr" &&
- V.CorrConfirm &&
moveCol == this.game.mycolor &&
!data.receiveMyMove
) {
if (data.score == "*") this.re_setClocks();
}
};
+ if (!V.CorrConfirm) {
+ afterSetScore();
+ return;
+ }
let el = document.querySelector("#buttonsConfirm > .acceptBtn");
// We may play several moves in a row: in case of, remove listener:
let elClone = el.cloneNode(true);