Commit a9306302 authored by Philippe Dpt35's avatar Philippe Dpt35

Modification de la déclaration des tableaux

parent dd976623
var CtAnimaux = new Array(0,0,0,0);
var AnimalparEnclos = new Array();
var imgAnimalparEnclos = new Array();
var CtAnimaux = [0,0,0,0];
var AnimalparEnclos = [];
var imgAnimalparEnclos = [];
var solution = new Array();
var proposition = new Array();
var solution = [];
var proposition = [];
for (var i=0; i<4; i++) {
solution[i] = new Array(0,0,0,0);
proposition[i] = new Array(0,0,0,0);
solution[i] = [0,0,0,0];
proposition[i] = [0,0,0,0];
}
var difficulte = "";
var informationsObjet = document.getElementById("informations");
......@@ -43,7 +43,7 @@ function estPresent(nombre, tableau) {
}
function aleaDifferent(min,max,quantite) {
var tableau = new Array();
var tableau = [];
var nombre;
for (var i = 0; i < quantite; i++) {
do {
......@@ -56,7 +56,7 @@ function aleaDifferent(min,max,quantite) {
function melange(tableau) {
var tirage;
var tab_alea = new Array();
var tab_alea = [];
for (var i = 0; i < tableau.length; i++) {
do {
......@@ -89,9 +89,9 @@ function defNiveau2() {
}
function tirageAnimaux() {
var EnclosAleatoire = new Array(1,2,3,4);
var EnclosAleatoire = [1,2,3,4];
EnclosAleatoire = melange(EnclosAleatoire);
var valeurs = new Array();
var valeurs = [];
switch(difficulte) {
case "Niveau1":
......@@ -126,11 +126,11 @@ function verification() {
var IdErreur;
var NoErreur;
var erreur = false;
var SolutionParEnclos = new Array();
var PropositionParEnclos = new Array();
var SolutionParEnclos = [];
var PropositionParEnclos = [];
for (var i = 0; i < 4; i++) {
SolutionParEnclos[i] = new Array(0,0,0,0);
PropositionParEnclos[i] = new Array(0,0,0,0);
SolutionParEnclos[i] = [0,0,0,0];
PropositionParEnclos[i] = [0,0,0,0];
}
for (var i = 0; i < 4; i++) {
for (var j = 0; j < 4; j++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment