+ if (!!this.$route.query["challenge"]) {
+ // Automatic challenge sending, for tournaments
+ this.loadNewchallVariant(
+ () => {
+ this.newchallenge = {
+ fen: "",
+ vid:
+ this.st.variants
+ .find(v => v.name == this.$route.query["variant"])
+ .id,
+ to: this.$route.query["challenge"],
+ color: this.$route.query["color"] || '',
+ cadence: this.$route.query["cadence"],
+ // Tournament: no randomness (TODO: for now at least)
+ randomness: 0,
+ memorize: false
+ };
+ this.issueNewChallenge();
+ },
+ this.$route.query["variant"]
+ );
+ }