3 input#modalInfo.modal(type="checkbox")
6 data-checkbox="modalInfo"
9 label.modal-close(for="modalInfo")
10 p(v-html="infoMessage")
11 input#modalAccept.modal(type="checkbox")
12 div#acceptDiv(role="dialog")
15 span.variantName {{ curChallToAccept.vname }}
16 span {{ curChallToAccept.cadence }}
17 span {{ st.tr["with"] + " " + curChallToAccept.from.name }}
18 .diagram(v-html="tchallDiag")
19 .button-group#buttonsTchall
20 button.acceptBtn(@click="decisionChallenge(true)") {{ st.tr["Accept challenge?"] }}
21 button.refuseBtn(@click="decisionChallenge(false)") {{ st.tr["Refuse"] }}
22 input#modalNewgame.modal(type="checkbox")
25 data-checkbox="modalNewgame"
28 label#closeNewgame.modal-close(for="modalNewgame")
29 div(@keyup.enter="newChallenge()")
31 label(for="selectVariant") {{ st.tr["Variant"] }} *
33 @change="loadNewchallVariant(trySetNewchallDiag)"
34 v-model="newchallenge.vid"
37 v-for="v in st.variants"
39 :selected="newchallenge.vid==v.id"
43 label(for="cadence") {{ st.tr["Cadence"] }} *
44 div#predefinedCadences
45 button(type="button") 5+3
46 button(type="button") 15+5
47 button(type="button") 45+30
48 button(type="button") 7d+2d
51 v-model="newchallenge.cadence"
52 placeholder="5+0, 1h+30s, 7d+1d ..."
54 fieldset(v-if="st.user.id > 0")
55 label(for="selectPlayers") {{ st.tr["Play with?"] }}
58 v-model="newchallenge.to"
60 fieldset(v-if="st.user.id > 0 && newchallenge.to.length > 0")
63 @input="trySetNewchallDiag()"
65 v-model="newchallenge.fen"
67 .diagram(v-html="newchallenge.diag")
68 button(@click="newChallenge()") {{ st.tr["Send challenge"] }}
69 input#modalPeople.modal(
71 @click="resetChatColor()"
75 data-checkbox="modalPeople"
78 label.modal-close(for="modalPeople")
82 v-for="sid in Object.keys(people)"
83 v-if="!!people[sid].name"
85 span {{ people[sid].name }}
87 v-if="isGamer(sid) || (st.user.id > 0 && sid!=st.user.sid)"
88 @click="challOrWatch(sid)"
90 | {{ getActionLabel(sid) }}
91 p.anonymous @nonymous ({{ anonymousCount }})
100 .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
102 button#peopleBtn(onClick="window.doClick('modalPeople')")
103 | {{ st.tr["Who's there?"] }}
104 button(onClick="window.doClick('modalNewgame')")
105 | {{ st.tr["New game"] }}
107 .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
110 button.tabbtn#btnClive(@click="setDisplay('c','live',$event)")
111 | {{ st.tr["Live challenges"] }}
112 button.tabbtn#btnCcorr(@click="setDisplay('c','corr',$event)")
113 | {{ st.tr["Correspondance challenges"] }}
115 v-show="cdisplay=='live'"
116 :challenges="filterChallenges('live')"
117 @click-challenge="clickChallenge"
120 v-show="cdisplay=='corr'"
121 :challenges="filterChallenges('corr')"
122 @click-challenge="clickChallenge"
126 button.tabbtn#btnGlive(@click="setDisplay('g','live',$event)")
127 | {{ st.tr["Live games"] }}
128 button.tabbtn#btnGcorr(@click="setDisplay('g','corr',$event)")
129 | {{ st.tr["Correspondance games"] }}
131 v-show="gdisplay=='live'"
132 :games="filterGames('live')"
134 @show-game="showGame"
137 v-show="gdisplay=='corr'"
138 :games="filterGames('corr')"
140 @show-game="showGame"
145 import { store } from "@/store";
146 import { checkChallenge } from "@/data/challengeCheck";
147 import { ArrayFun } from "@/utils/array";
148 import { ajax } from "@/utils/ajax";
149 import params from "@/parameters";
150 import { getRandString, shuffle } from "@/utils/alea";
151 import { getDiagram } from "@/utils/printDiagram";
152 import Chat from "@/components/Chat.vue";
153 import GameList from "@/components/GameList.vue";
154 import ChallengeList from "@/components/ChallengeList.vue";
155 import { GameStorage } from "@/utils/gameStorage";
156 import { processModalClick } from "@/utils/modalClick";
167 cdisplay: "live", //or corr
175 vid: parseInt(localStorage.getItem("vid")) || 0,
176 to: "", //name of challenged player (if any)
177 cadence: localStorage.getItem("cadence") || "",
178 // VariantRules object, stored to not interfere with
179 // diagrams of targetted challenges:
182 diag: "" //visualizing FEN
185 curChallToAccept: {from: {}},
189 // Related to (killing of) self multi-connects:
195 // st.variants changes only once, at loading from [] to [...]
196 "st.variants": function() {
197 // Set potential challenges and games variant names:
198 this.challenges.concat(this.games).forEach(o => {
199 if (o.vname == "") o.vname = this.getVname(o.vid);
201 if (!this.newchallenge.V && this.newchallenge.vid > 0)
202 this.loadNewchallVariant();
206 anonymousCount: function() {
208 Object.values(this.people).forEach(p => {
209 count += !p.name ? 1 : 0;
214 created: function() {
215 if (this.st.variants.length > 0 && this.newchallenge.vid > 0)
216 this.loadNewchallVariant();
217 const my = this.st.user;
218 this.$set(this.people, my.sid, { id: my.id, name: my.name, pages: ["/"] });
219 // Ask server for current corr games (all but mines)
223 { uid: this.st.user.id, excluded: true },
225 this.games = this.games.concat(
226 response.games.map(g => {
227 const type = this.classifyObject(g);
228 const vname = this.getVname(g.vid);
229 return Object.assign({}, g, { type: type, vname: vname });
234 // Also ask for corr challenges (open + sent by/to me)
235 ajax("/challenges", "GET", { uid: this.st.user.id }, response => {
236 // Gather all senders names, and then retrieve full identity:
237 // (TODO [perf]: some might be online...)
239 response.challenges.forEach(c => {
240 if (c.uid != this.st.user.id) names[c.uid] = "";
241 else if (!!c.target && c.target != this.st.user.id)
242 names[c.target] = "";
244 const addChallenges = () => {
245 names[this.st.user.id] = this.st.user.name; //in case of
246 this.challenges = this.challenges.concat(
247 response.challenges.map(c => {
248 const from = { name: names[c.uid], id: c.uid }; //or just name
249 const type = this.classifyObject(c);
250 const vname = this.getVname(c.vid);
251 return Object.assign(
257 to: c.target ? names[c.target] : ""
264 if (Object.keys(names).length > 0) {
268 { ids: Object.keys(names).join(",") },
270 response2.users.forEach(u => {
271 names[u.id] = u.name;
276 } else addChallenges();
278 const connectAndPoll = () => {
279 this.send("connect");
280 this.send("pollclientsandgamers");
282 // Initialize connection
283 this.connexionString =
290 encodeURIComponent(this.$route.path);
291 this.conn = new WebSocket(this.connexionString);
292 this.conn.onopen = connectAndPoll;
293 this.conn.onmessage = this.socketMessageListener;
294 this.conn.onclose = this.socketCloseListener;
296 mounted: function() {
297 ["peopleWrap", "infoDiv", "newgameDiv"].forEach(eltName => {
298 let elt = document.getElementById(eltName);
299 elt.addEventListener("click", processModalClick);
301 document.querySelectorAll("#predefinedCadences > button").forEach(b => {
302 b.addEventListener("click", () => {
303 this.newchallenge.cadence = b.innerHTML;
306 const dispCorr = this.$route.query["disp"];
308 dispCorr || localStorage.getItem("type-challenges") || "live";
310 dispCorr || localStorage.getItem("type-games") || "live";
311 this.setDisplay("c", showCtype);
312 this.setDisplay("g", showGtype);
314 beforeDestroy: function() {
315 this.send("disconnect");
319 send: function(code, obj) {
321 this.conn.send(JSON.stringify(Object.assign({ code: code }, obj)));
324 getVname: function(vid) {
325 const variant = this.st.variants.find(v => v.id == vid);
326 // this.st.variants might be uninitialized (variant == null)
327 return variant ? variant.name : "";
329 filterChallenges: function(type) {
330 return this.challenges.filter(c => c.type == type);
332 filterGames: function(type) {
333 return this.games.filter(g => g.type == type);
335 classifyObject: function(o) {
337 return o.cadence.indexOf("d") === -1 ? "live" : "corr";
339 setDisplay: function(letter, type, e) {
340 this[letter + "display"] = type;
341 localStorage.setItem(
342 "type-" + (letter == "c" ? "challenges" : "games"),
347 : document.getElementById("btn" + letter.toUpperCase() + type);
348 elt.classList.add("active");
349 elt.classList.remove("somethingnew"); //in case of
350 if (elt.previousElementSibling)
351 elt.previousElementSibling.classList.remove("active");
352 else elt.nextElementSibling.classList.remove("active");
354 isGamer: function(sid) {
355 return this.people[sid].pages.some(p => p.indexOf("/game/") >= 0);
357 getActionLabel: function(sid) {
358 return this.people[sid].pages.some(p => p == "/")
362 challOrWatch: function(sid) {
363 if (this.people[sid].pages.some(p => p == "/")) {
364 // Available, in Hall
365 this.newchallenge.to = this.people[sid].name;
366 document.getElementById("modalPeople").checked = false;
367 window.doClick("modalNewgame");
369 // In some game, maybe playing maybe not: show a random one
371 this.people[sid].pages.forEach(p => {
372 const matchGid = p.match(/[a-zA-Z0-9]+$/);
373 if (matchGid) gids.push(matchGid[0]);
375 const gid = gids[Math.floor(Math.random() * gids.length)];
376 const game = this.games.find(g => g.id == gid);
377 if (game) this.showGame(game);
378 else this.$router.push("/game/" + gid); //game vs. me
381 showGame: function(g) {
382 // NOTE: we are an observer, since only games I don't play are shown here
383 // ==> Moves sent by connected remote player(s) if live game
384 let url = "/game/" + g.id;
385 if (g.type == "live")
386 url += "?rid=" + g.rids[Math.floor(Math.random() * g.rids.length)];
387 this.$router.push(url);
389 resetChatColor: function() {
390 // TODO: this is called twice, once on opening an once on closing
391 document.getElementById("peopleBtn").classList.remove("somethingnew");
393 processChat: function(chat) {
394 this.send("newchat", { data: chat });
397 socketMessageListener: function(msg) {
398 if (!this.conn) return;
399 const data = JSON.parse(msg.data);
401 case "pollclientsandgamers": {
402 // Since people can be both in Hall and Game,
403 // need to track "askIdentity" requests:
404 let identityAsked = {};
405 data.sockIds.forEach(s => {
406 const page = s.page || "/";
407 if (s.sid != this.st.user.sid && !identityAsked[s.sid]) {
408 identityAsked[s.sid] = true;
409 this.send("askidentity", { target: s.sid, page: page });
411 if (!this.people[s.sid])
412 this.$set(this.people, s.sid, { id: 0, name: "", pages: [page] });
413 else if (this.people[s.sid].pages.indexOf(page) < 0)
414 this.people[s.sid].pages.push(page);
417 this.send("askchallenge", { target: s.sid });
419 else this.send("askgame", { target: s.sid, page: page });
425 const page = data.page || "/";
426 // NOTE: player could have been polled earlier, but might have logged in then
427 // So it's a good idea to ask identity if he was anonymous.
428 // But only ask game / challenge if currently disconnected.
429 if (!this.people[data.from]) {
430 this.$set(this.people, data.from, {
435 if (data.code == "connect")
436 this.send("askchallenge", { target: data.from });
437 else this.send("askgame", { target: data.from, page: page });
439 // append page if not already in list
440 if (this.people[data.from].pages.indexOf(page) < 0)
441 this.people[data.from].pages.push(page);
443 if (this.people[data.from].id == 0) {
444 this.newConnect[data.from] = true; //for self multi-connects tests
445 this.send("askidentity", { target: data.from, page: page });
450 case "gdisconnect": {
451 // If the user reloads the page twice very quickly (experienced with Firefox),
452 // the first reload won't have time to connect but will trigger a "close" event anyway.
453 // ==> Next check is required.
454 if (!this.people[data.from]) return;
455 // Disconnect means no more tmpIds:
456 if (data.code == "disconnect") {
457 // Remove the live challenge sent by this player:
458 ArrayFun.remove(this.challenges, c => c.from.sid == data.from);
460 // Remove the matching live game if now unreachable
461 const gid = data.page.match(/[a-zA-Z0-9]+$/)[0];
462 const gidx = this.games.findIndex(g => g.id == gid);
464 const game = this.games[gidx];
466 game.type == "live" &&
467 game.rids.length == 1 &&
468 game.rids[0] == data.from
470 this.games.splice(gidx, 1);
474 const page = data.page || "/";
475 ArrayFun.remove(this.people[data.from].pages, p => p == page);
476 if (this.people[data.from].pages.length == 0)
477 this.$delete(this.people, data.from);
481 // I logged in elsewhere:
482 alert(this.st.tr["New connexion detected: tab now offline"]);
483 // TODO: this fails. See https://github.com/websockets/ws/issues/489
484 //this.conn.removeEventListener("message", this.socketMessageListener);
485 //this.conn.removeEventListener("close", this.socketCloseListener);
489 case "askidentity": {
490 // Request for identification (TODO: anonymous shouldn't need to reply)
492 // Decompose to avoid revealing email
493 name: this.st.user.name,
494 sid: this.st.user.sid,
497 this.send("identity", { data: me, target: data.from });
501 const user = data.data;
503 // If I multi-connect, kill current connexion if no mark (I'm older)
505 this.newConnect[user.sid] &&
507 user.id == this.st.user.id &&
508 user.sid != this.st.user.sid
510 if (!this.killed[this.st.user.sid]) {
511 this.send("killme", { sid: this.st.user.sid });
512 this.killed[this.st.user.sid] = true;
515 if (user.sid != this.st.user.sid) {
516 //I already know my identity...
517 this.$set(this.people, user.sid, {
520 pages: this.people[user.sid].pages
524 delete this.newConnect[user.sid];
527 case "askchallenge": {
528 // Send my current live challenge (if any)
529 const cIdx = this.challenges.findIndex(
530 c => c.from.sid == this.st.user.sid && c.type == "live"
533 const c = this.challenges[cIdx];
534 // NOTE: in principle, should only send targeted challenge to the target.
535 // But we may not know yet the identity of the target (just name),
536 // so cannot decide if data.from is the target or not.
537 const myChallenge = {
539 from: this.st.user.sid,
546 this.send("challenge", { data: myChallenge, target: data.from });
550 case "challenge": //after "askchallenge"
551 case "newchallenge": {
552 // NOTE about next condition: see "askchallenge" case.
553 const chall = data.data;
556 (this.people[chall.from].id > 0 &&
557 (chall.from == this.st.user.sid || chall.to == this.st.user.name))
559 let newChall = Object.assign({}, chall);
560 newChall.type = this.classifyObject(chall);
561 newChall.added = Date.now();
562 let fromValues = Object.assign({}, this.people[chall.from]);
563 delete fromValues["pages"]; //irrelevant in this context
564 newChall.from = Object.assign({ sid: chall.from }, fromValues);
565 newChall.vname = this.getVname(newChall.vid);
566 this.challenges.push(newChall);
568 (newChall.type == "live" && this.cdisplay == "corr") ||
569 (newChall.type == "corr" && this.cdisplay == "live")
572 .getElementById("btnC" + newChall.type)
573 .classList.add("somethingnew");
578 case "refusechallenge": {
579 const cid = data.data;
580 ArrayFun.remove(this.challenges, c => c.id == cid);
581 alert(this.st.tr["Challenge declined"]);
584 case "deletechallenge": {
585 // NOTE: the challenge may be already removed
586 const cid = data.data;
587 ArrayFun.remove(this.challenges, c => c.id == cid);
590 case "game": //individual request
592 // NOTE: it may be live or correspondance
593 const game = data.data;
594 // Ignore games where I play (corr games)
595 if (game.players.every(p => p.id != this.st.user.id))
597 let locGame = this.games.find(g => g.id == game.id);
600 newGame.type = this.classifyObject(game);
601 newGame.vname = this.getVname(game.vid);
603 //if new game from Hall
605 newGame.rids = [game.rid];
606 delete newGame["rid"];
607 this.games.push(newGame);
609 (newGame.type == "live" && this.gdisplay == "corr") ||
610 (newGame.type == "corr" && this.gdisplay == "live")
613 .getElementById("btnG" + newGame.type)
614 .classList.add("somethingnew");
617 // Append rid (if not already in list)
618 if (!locGame.rids.includes(game.rid)) locGame.rids.push(game.rid);
624 let g = this.games.find(g => g.id == data.gid);
625 if (g) g.score = data.score;
629 // New game just started: data contain all information
630 const gameInfo = data.data;
631 if (this.classifyObject(gameInfo) == "live")
632 this.startNewGame(gameInfo);
635 this.st.tr["New correspondance game:"] +
636 " <a href='#/game/" +
642 let modalBox = document.getElementById("modalInfo");
643 modalBox.checked = true;
648 this.newChat = data.data;
649 if (!document.getElementById("modalPeople").checked)
650 document.getElementById("peopleBtn").classList.add("somethingnew");
654 socketCloseListener: function() {
655 if (!this.conn) return;
656 this.conn = new WebSocket(this.connexionString);
657 this.conn.addEventListener("message", this.socketMessageListener);
658 this.conn.addEventListener("close", this.socketCloseListener);
660 // Challenge lifecycle:
661 loadNewchallVariant: async function(cb) {
662 const vname = this.getVname(this.newchallenge.vid);
663 const vModule = await import("@/variants/" + vname + ".js");
664 this.newchallenge.V = vModule.VariantRules;
665 this.newchallenge.vname = vname;
669 trySetNewchallDiag: function() {
670 if (!this.newchallenge.fen) {
671 this.newchallenge.diag = "";
674 // If vid > 0 then the variant is loaded (function above):
675 window.V = this.newchallenge.V;
677 this.newchallenge.vid > 0 &&
678 this.newchallenge.fen &&
679 V.IsGoodFen(this.newchallenge.fen)
681 const parsedFen = V.ParseFen(this.newchallenge.fen);
682 this.newchallenge.diag = getDiagram({
683 position: parsedFen.position,
684 orientation: V.GetOppCol(parsedFen.turn)
688 newChallenge: async function() {
689 if (this.newchallenge.cadence.match(/^[0-9]+$/))
690 this.newchallenge.cadence += "+0"; //assume minutes, no increment
691 const ctype = this.classifyObject(this.newchallenge);
692 // TODO: cadence still unchecked so ctype could be wrong...
694 if (!this.newchallenge.vid)
695 error = this.st.tr["Please select a variant"];
696 else if (ctype == "corr" && this.st.user.id <= 0)
697 error = this.st.tr["Please log in to play correspondance games"];
698 else if (this.newchallenge.to) {
699 if (this.newchallenge.to == this.st.user.name)
700 error = this.st.tr["Self-challenge is forbidden"];
703 Object.values(this.people).every(p => p.name != this.newchallenge.to)
705 error = this.newchallenge.to + " " + this.st.tr["is not online"];
711 window.V = this.newchallenge.V;
712 error = checkChallenge(this.newchallenge);
717 // NOTE: "from" information is not required here
718 let chall = Object.assign({}, this.newchallenge);
719 const finishAddChallenge = cid => {
720 chall.id = cid || "c" + getRandString();
721 // Remove old challenge if any (only one at a time of a given type):
722 const cIdx = this.challenges.findIndex(
724 (c.from.sid == this.st.user.sid || c.from.id == this.st.user.id) &&
728 // Delete current challenge (will be replaced now)
729 this.send("deletechallenge", { data: this.challenges[cIdx].id });
730 if (ctype == "corr") {
731 ajax("/challenges", "DELETE", { id: this.challenges[cIdx].id });
733 this.challenges.splice(cIdx, 1);
735 this.send("newchallenge", {
736 data: Object.assign({ from: this.st.user.sid }, chall)
738 // Add new challenge:
740 // Decompose to avoid revealing email
741 sid: this.st.user.sid,
743 name: this.st.user.name
745 chall.added = Date.now();
746 // NOTE: vname and type are redundant (can be deduced from cadence + vid)
748 chall.vname = this.newchallenge.vname;
749 this.challenges.push(chall);
750 // Remember cadence + vid for quicker further challenges:
751 localStorage.setItem("cadence", chall.cadence);
752 localStorage.setItem("vid", chall.vid);
753 document.getElementById("modalNewgame").checked = false;
754 // Show the challenge if not on current display
756 (ctype == "live" && this.cdisplay == "corr") ||
757 (ctype == "corr" && this.cdisplay == "live")
759 this.setDisplay('c', ctype);
762 if (ctype == "live") {
763 // Live challenges have a random ID
764 finishAddChallenge(null);
766 // Correspondance game: send challenge to server
767 ajax("/challenges", "POST", { chall: chall }, response => {
768 finishAddChallenge(response.cid);
772 // Callback function after a diagram was showed to accept
773 // or refuse targetted challenge:
774 decisionChallenge: function(accepted) {
775 this.curChallToAccept.accepted = accepted;
776 this.finishProcessingChallenge(this.curChallToAccept);
777 document.getElementById("modalAccept").checked = false;
779 finishProcessingChallenge: function(c) {
782 // Again, avoid c.seat = st.user to not reveal email
783 sid: this.st.user.sid,
785 name: this.st.user.name
789 this.send("refusechallenge", { data: c.id, target: c.from.sid });
791 this.send("deletechallenge", { data: c.id });
793 clickChallenge: async function(c) {
795 c.from.sid == this.st.user.sid || //live
796 (this.st.user.id > 0 && c.from.id == this.st.user.id); //corr
798 if (c.type == "corr" && this.st.user.id <= 0) {
799 alert(this.st.tr["Please log in to accept corr challenges"]);
803 const vModule = await import("@/variants/" + c.vname + ".js");
804 window.V = vModule.VariantRules;
806 // c.to == this.st.user.name (connected)
808 const parsedFen = V.ParseFen(c.fen);
809 c.mycolor = V.GetOppCol(parsedFen.turn);
810 this.tchallDiag = getDiagram({
811 position: parsedFen.position,
812 orientation: c.mycolor
814 this.curChallToAccept = c;
815 document.getElementById("modalAccept").checked = true;
818 if (!confirm(this.st.tr["Accept challenge?"]))
820 this.finishProcessingChallenge(c);
824 this.finishProcessingChallenge(c);
828 if (c.type == "corr") {
829 ajax("/challenges", "DELETE", { id: c.id });
831 this.send("deletechallenge", { data: c.id });
833 // In all cases, the challenge is consumed:
834 ArrayFun.remove(this.challenges, ch => ch.id == c.id);
836 // NOTE: when launching game, the challenge is already being deleted
837 launchGame: function(c) {
838 // These game informations will be shared
841 fen: c.fen || V.GenRandInitFen(),
842 // White player index 0, black player index 1:
844 ? (c.mycolor == "w" ? [c.seat, c.from] : [c.from, c.seat])
845 : shuffle([c.from, c.seat]),
849 let oppsid = c.from.sid; //may not be defined if corr + offline opp
851 oppsid = Object.keys(this.people).find(
852 sid => this.people[sid].id == c.from.id
855 const notifyNewgame = () => {
858 this.send("startgame", { data: gameInfo, target: oppsid });
859 // Send game info (only if live) to everyone except me in this tab
860 this.send("newgame", { data: gameInfo });
862 if (c.type == "live") {
864 this.startNewGame(gameInfo);
865 } //corr: game only on server
870 { gameInfo: gameInfo, cid: c.id }, //cid useful to delete challenge
872 gameInfo.id = response.gameId;
874 this.$router.push("/game/" + response.gameId);
879 // NOTE: for live games only (corr games start on the server)
880 startNewGame: function(gameInfo) {
881 const game = Object.assign({}, gameInfo, {
882 // (other) Game infos: constant
883 fenStart: gameInfo.fen,
884 vname: this.getVname(gameInfo.vid),
886 // Game state (including FEN): will be updated
888 clocks: [-1, -1], //-1 = unstarted
889 initime: [0, 0], //initialized later
892 GameStorage.add(game, (err) => {
893 // If an error occurred, game is not added: abort
895 if (this.st.settings.sound)
896 new Audio("/sounds/newgame.wav").play().catch(() => {});
897 this.$router.push("/game/" + gameInfo.id);
905 <style lang="sass" scoped>
913 #newgameDiv > .card, #acceptDiv > .card
917 div#peopleWrap > .card
920 @media screen and (min-width: 1281px)
921 div#peopleWrap > .card
924 @media screen and (max-width: 1280px)
925 div#peopleWrap > .card
928 @media screen and (max-width: 767px)
929 div#peopleWrap > .card
942 @media screen and (max-width: 767px)
961 background-color: #c5fefe !important
964 background-color: #f9faee
967 background-color: lightgreen
969 background-color: red
986 @media screen and (max-width: 767px)