X-Git-Url: https://git.auder.net/img/rock_paper_scissors_lizard_spock.gif?a=blobdiff_plain;f=public%2Fjavascripts%2Fcomponents%2Froom.js;h=f5daee28b4b4100c6a64f83062259553446a180d;hb=7ee085c29c53c5072008e10a1ec8d3a763f42859;hp=16fcc903278d79a85af8a5bdec6dc32cf5799926;hpb=81da2786f2f497b4416e0488c34a48fb794c28df;p=vchess.git diff --git a/public/javascripts/components/room.js b/public/javascripts/components/room.js index 16fcc903..f5daee28 100644 --- a/public/javascripts/components/room.js +++ b/public/javascripts/components/room.js @@ -8,6 +8,17 @@ div(role="dialog" aria-labelledby="newGameTxt") p= translations["Waiting for opponent..."] */ + + + +// TODO: my-challenge-list, gérant clicks sur challenges, affichage, réception/émission des infos sur challenges +// de même, my-player-list + + + + +// TODO: si on est en train de jouer une partie, le notifier aux nouveaux connectés + /* Players + challenges : == "room" home of variant (surligner si nouveau défi perso et pas affichage courant) joueurs en ligne (dte), @@ -57,7 +68,7 @@ fin de partie corr: garder maxi nbPlayers lastMove sur serveur, pendant 7 jours if (mode=="human" && !oppId) { const storageVariant = localStorage.getItem("variant"); - if (!!storageVariant && storageVariant !== variant + if (!!storageVariant && storageVariant !== variant.name && localStorage["score"] == "*") { return alert(translations["Finish your "] + @@ -82,7 +93,7 @@ fin de partie corr: garder maxi nbPlayers lastMove sur serveur, pendant 7 jours if (!!storageVariant) { const score = localStorage.getItem(prefix+"score"); - if (storageVariant !== variant && score == "*") + if (storageVariant !== variant.name && score == "*") { if (!confirm(storageVariant + translations[": unfinished computer game will be erased"])) @@ -98,7 +109,7 @@ fin de partie corr: garder maxi nbPlayers lastMove sur serveur, pendant 7 jours if (!!storageVariant) { const score = localStorage.getItem(prefix+"score"); - if (storageVariant !== variant && score == "*") + if (storageVariant !== variant.name && score == "*") { if (!confirm(storageVariant + translations[": current analysis will be erased"]))