|
|
|
@ -262,20 +262,12 @@ function journuit() {
|
|
|
|
|
//changer logo swish
|
|
|
|
|
document.getElementById("imglogo").src = "imgs/swishjour.png";
|
|
|
|
|
document.getElementById("imglogo2").src = "imgs/swishjour.png";
|
|
|
|
|
/*
|
|
|
|
|
MESSAGE POUR CEUX QUI FONT LES TESTS ! Recommentez les lignes après ! Merci
|
|
|
|
|
*/
|
|
|
|
|
//document.getElementById("fondinput").style.backgroundColor = lightsedonca;
|
|
|
|
|
document.getElementById("contourbuttonvalider").style.backgroundColor = lightsedonca;
|
|
|
|
|
//document.getElementById("textjouer").style.color = lightsedonca;
|
|
|
|
|
//document.getElementById("textplus").style.color = lightprima;
|
|
|
|
|
//changer montagnesfond
|
|
|
|
|
document.getElementById("mount1").src = "imgs/mount1.png";
|
|
|
|
|
document.getElementById("mount2").src = "imgs/mount2.png";
|
|
|
|
|
//nuages
|
|
|
|
|
document.getElementById("cloud").src = "imgs/lightcloud.png";
|
|
|
|
|
//changer background color
|
|
|
|
|
//document.getElementById("containplayers").style.color = lightsedonca;
|
|
|
|
|
//maj couleur principales
|
|
|
|
|
document.documentElement.style.setProperty('--lightprima', lightprima);
|
|
|
|
|
document.documentElement.style.setProperty('--lightsedonca', lightsedonca);
|
|
|
|
@ -286,18 +278,12 @@ function journuit() {
|
|
|
|
|
//changer logo swish
|
|
|
|
|
document.getElementById("imglogo").src = "imgs/swishnuit.png";
|
|
|
|
|
document.getElementById("imglogo2").src = "imgs/swishnuit.png";
|
|
|
|
|
|
|
|
|
|
//document.getElementById("fondinput").style.backgroundColor = darkseconda;
|
|
|
|
|
document.getElementById("contourbuttonvalider").style.backgroundColor = darkseconda;
|
|
|
|
|
//document.getElementById("textjouer").style.color = darkseconda;
|
|
|
|
|
//document.getElementById("textplus").style.color = darkprima;
|
|
|
|
|
//changer montagnesfond
|
|
|
|
|
document.getElementById("mount1").src = "imgs/darkmount1.png";
|
|
|
|
|
document.getElementById("mount2").src = "imgs/darkmount2.png";
|
|
|
|
|
//nuages
|
|
|
|
|
document.getElementById("cloud").src = "imgs/darkcloud.png";
|
|
|
|
|
//mode nuit
|
|
|
|
|
//document.getElementById("containplayers").style.color = darkseconda;
|
|
|
|
|
//maj couleur principales
|
|
|
|
|
document.documentElement.style.setProperty('--lightprima', darkprima);
|
|
|
|
|
document.documentElement.style.setProperty('--lightsedonca', darkseconda);
|
|
|
|
@ -1053,59 +1039,6 @@ function SommeDeCarte(CarteMere, CarteFille) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function ChoisirPseudo() {
|
|
|
|
|
let nom = localStorage.getItem('nom');
|
|
|
|
|
if (nom == null) {
|
|
|
|
|
nom = "SWISH";
|
|
|
|
|
}
|
|
|
|
|
document.getElementById('inputpseudo').setAttribute('value', nom);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function EnvoyerNouveauNom() {
|
|
|
|
|
|
|
|
|
|
let pseudo = document.getElementById('inputpseudo').value;
|
|
|
|
|
localStorage.setItem('nom', pseudo);
|
|
|
|
|
document.location.reload(true);
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function addplayer(){
|
|
|
|
|
//j'ai mis une limite de 6joueurs, mais c'est a voir
|
|
|
|
|
if(nbplayers < 7){
|
|
|
|
|
//creation de la div contenant le pseudo
|
|
|
|
|
var divpseudo = document.createElement('div');
|
|
|
|
|
divpseudo.id = 'pseudolist';
|
|
|
|
|
//reprise du pseudo entre par le joueur
|
|
|
|
|
var pseudo = document.getElementById("inputpseudo").value;
|
|
|
|
|
//verification si pseudo vide pour lui donner un pseudo du style "Joueur3"
|
|
|
|
|
if(pseudo == "")
|
|
|
|
|
{
|
|
|
|
|
pseudo = "Joueur " + nbplayers;
|
|
|
|
|
}
|
|
|
|
|
//creation du text-pseudo
|
|
|
|
|
var tag = document.createElement("p");
|
|
|
|
|
tag.className = "pseudojoueur";
|
|
|
|
|
var text = document.createTextNode(pseudo);
|
|
|
|
|
tag.appendChild(text);
|
|
|
|
|
//mise du text dans la division
|
|
|
|
|
divpseudo.appendChild(tag);
|
|
|
|
|
//insertion pseudo dans liste
|
|
|
|
|
document.getElementById("containplayers").appendChild(divpseudo);
|
|
|
|
|
//remise input vide ;)
|
|
|
|
|
document.getElementById("inputpseudo").value = "";
|
|
|
|
|
nbplayers = nbplayers +1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function ajouterplayer(event){
|
|
|
|
|
if(event.keyCode == 13)
|
|
|
|
|
addplayer();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function doublonInterdit(uneCarte) {
|
|
|
|
|
var lesCoPetit = [];
|
|
|
|
|