Golfier
algolfier 4 years ago
parent 55d9423cd8
commit 53eebc9dfb

@ -1241,8 +1241,14 @@ function chercherCombinaison() {
for (var h = 0; h < DeckTeste.length; h++) {
recup.push(deckPartie.indexOf(DeckTeste[h]) + 1);
}
if(!modelangue){
window.alert("Combinaison a " + (N + 2) + " cartes trouvée : " + recup);
}
else{
window.alert("Combination with " + (N + 2) + " cards found : " + recup);
}
}
}
}
}
@ -1284,8 +1290,14 @@ function printCombinations(array, p) {
}
}
run(0, 0);
if(!modelangue){
window.alert("fin test " + k + " cartes")
}
else{
window.alert("end test " + k + " cards")
}
}
window.alert("nb combi :" + Cptsolution);
}
@ -1310,8 +1322,14 @@ function testCombinaison(DeckTeste, combi, Cptsolution) {
//Reagarde si il y a une solution
if (!solution) {
Cptsolution++;
if(!modelangue){
window.alert("Combinaison à " + (DeckTeste.length) + " cartes trouvée : " + combi);
}
else{
window.alert("Combination with " + (DeckTeste.length) + " cards found : " + combi);
}
}
return Cptsolution;
}
@ -1355,11 +1373,23 @@ function chercheCombi2() {
}
if (!solution) {
Cptsolution++;
if(!modelangue){
window.alert("Combinaison a 2 trouve: " + (i + 1) + " " + (i + j + 2));
}
else{
window.alert("Combination with 2 found: " + (i + 1) + " " + (i + j + 2));
}
}
}
}
if(!modelangue){
window.alert("Nombre de solution a 2 cartes : " + Cptsolution);
}
else{
window.alert("Number of solutions with 2 cards : " + Cptsolution);
}
}
//=================================================================================
@ -1443,15 +1473,33 @@ function chercheCombi3() {
}
if (!solution) {
Cptsolution++;
if(!modelangue){
window.alert("Combinaison a 3 trouve: " + (i + 1) + " " + (i + j + 2) + " " + (k + j + i + 3));
}
else{
window.alert("Combination with 3 found: " + (i + 1) + " " + (i + j + 2) + " " + (k + j + i + 3));
}
}
}
}
}
if (Cptsolution == 0) {
if(!modelangue){
window.alert("Pas de solution");
}
else{
window.alert("No solution");
}
}
if(!modelangue){
window.alert("Nombre de solution a 3 cartes : " + Cptsolution);
}
else{
window.alert("Number of solutions with 3 cards : " + Cptsolution);
}
}
@ -1681,11 +1729,23 @@ function copieLiseDeFigure(Liste) {
}
function copieFigure(uneFigure) {
if(!modelangue){
window.alert("Avant copiage " + uneFigure.CodeHTML)
}
else{
window.alert("Before copying " + uneFigure.CodeHTML)
}
if (uneFigure == null) {
return null;
}
window.alert("je fais la copie")
if(!modelangue){
window.alert("je fais la copie");
}
else{
window.alert("I make the copy");
}
var copie = new Figure(uneFigure.type, uneFigure.forme, uneFigure.X, uneFigure.Y);
return copie;
}
@ -1877,27 +1937,10 @@ function bacASable() {
afficherCartes(lesCartes);
}
/*function functionLange(){
if(lange % 2 == 0){
//mode anglais
document.getElementById('flag_top').src = "imgs/flags/flag-uk.png";
document.getElementById('textjouer').value = "PLAY";
}
else{
//mode français
document.getElementById('flag_top').src = "imgs/flags/flag-france.png";
document.getElementById('textjouer').value = "JOUER";
}
lange += 1;
}*/
function functionLange(){
//window.alert(modelangue);
if(modelangue){
modelangue = false;
//MODE FRANCAIS =======
@ -1948,17 +1991,3 @@ function functionLange(){
}
}
/*function trad(){
//var flag_top = document.getElementById("flag_top");
//var flag_bottom = document.getElementById("flag_bottom");
mode = mode + 1;
if (mode % 2 == 0) {
}
else {
}
}*/

Loading…
Cancel
Save