- c.accepted = true;
- await import("@/variants/" + c.vname + ".js")
- .then((vModule) => {
- window.V = vModule[c.vname + "Rules"];
- if (!!c.to) {
- // c.to == this.st.user.name (connected)
- if (!!c.fen) {
- const parsedFen = V.ParseFen(c.fen);
- this.tchallDiag = getDiagram({
- position: parsedFen.position,
- orientation: parsedFen.turn
- });
+ if (c.type == "simul") {
+ // Just notify that I wanna enter the simultaneous game(s)
+ // TODO: dans défi, indiquer si positions aleatoires, si tjours blancs ou noirs
+ // --> /w30 ou b1h ou juste 30 (random, sans préfixe).
+ // => message "entersimul" to c.from
+ return;
+ }
+ else {
+ c.accepted = true;
+ await import("@/variants/" + c.vname + ".js")
+ .then((vModule) => {
+ window.V = vModule[c.vname + "Rules"];
+ if (!!c.to) {
+ // c.to == this.st.user.name (connected)
+ if (!!c.fen) {
+ const parsedFen = V.ParseFen(c.fen);
+ this.tchallDiag = getDiagram({
+ position: parsedFen.position,
+ orientation: parsedFen.turn
+ });
+ }
+ this.curChallToAccept = c;
+ document.getElementById("modalAccept").checked = true;