1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
| import java.io.*;
import java.util.*;
import java.lang.Math;
import java.util.Random;
public class main{
public static void main(String[]args){
/*creation du plateau*/
Plateau Pla1 = new Plateau (15, 15);
//placement des enzymes
Pla1.placerElement(1,1,"E1"); Pla1.placerElement(1,3,"E1"); Pla1.placerElement(1,5,"E1"); Pla1.placerElement(1,7,"E1");
Pla1.placerElement(1,9,"E1"); Pla1.placerElement(1,11,"E1"); Pla1.placerElement(1,13,"E1"); Pla1.placerElement(1,15,"E1");
Pla1.placerElement(15,1,"E2"); Pla1.placerElement(15,3,"E2"); Pla1.placerElement(15,5,"E2"); Pla1.placerElement(15,7,"E2");
Pla1.placerElement(15,9,"E2"); Pla1.placerElement(15,11,"E2"); Pla1.placerElement(15,13,"E2"); Pla1.placerElement(15,15,"E2");
//placement des lipides L1
//ligne2
Pla1.placerElement(2,3,"L1"); Pla1.placerElement(2,5,"L1"); Pla1.placerElement(2,7,"L1");
Pla1.placerElement(2,11,"L1"); Pla1.placerElement(2,9,"L1"); Pla1.placerElement(2,13,"L1");
//ligne 3
Pla1.placerElement(3,2,"L1"); Pla1.placerElement(3,4,"L1"); Pla1.placerElement(3,6,"L1"); Pla1.placerElement(3,8,"L1");
Pla1.placerElement(3,10,"L1"); Pla1.placerElement(3,12,"L1"); Pla1.placerElement(3,14,"L1");
//ligne 4
Pla1.placerElement(4,1,"L1"); Pla1.placerElement(4,3,"L1"); Pla1.placerElement(4,5,"L1");
Pla1.placerElement(4,9,"L1"); Pla1.placerElement(4,11,"L1"); Pla1.placerElement(4,13,"L1");
//placement des lipides L2
//ligne 14
Pla1.placerElement(14,3,"L2"); Pla1.placerElement(14,5,"L2"); Pla1.placerElement(14,7,"L2");
Pla1.placerElement(14,9,"L2"); Pla1.placerElement(14,11,"L2"); Pla1.placerElement(14,13,"L2");
//ligne 13
Pla1.placerElement(13,2,"L2"); Pla1.placerElement(13,4,"L2"); Pla1.placerElement(13,6,"L2"); Pla1.placerElement(13,8,"L2");
Pla1.placerElement(13,10,"L2"); Pla1.placerElement(13,12,"L2"); Pla1.placerElement(13,14,"L2");
//ligne 12
Pla1.placerElement(12,3,"L2"); Pla1.placerElement(12,5,"L2"); Pla1.placerElement(12,7,"L2"); Pla1.placerElement(12,9,"L2");
Pla1.placerElement(12,11,"L2"); Pla1.placerElement(12,13,"L2"); Pla1.placerElement(12, 15,"L2");
//Affichage de la grille de jeu
Pla1.affiche();
System.out.println("le nouvel element est ");
}
} |
Partager