Compare commits
	
		
			1 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					7a3546c81c | 
@@ -37,7 +37,7 @@ includes=**
 | 
				
			|||||||
jar.compress=false
 | 
					jar.compress=false
 | 
				
			||||||
javac.classpath=
 | 
					javac.classpath=
 | 
				
			||||||
# Space-separated list of extra javac options
 | 
					# Space-separated list of extra javac options
 | 
				
			||||||
javac.compilerargs=
 | 
					javac.compilerargs=\ --enable-preview
 | 
				
			||||||
javac.deprecation=false
 | 
					javac.deprecation=false
 | 
				
			||||||
javac.external.vm=true
 | 
					javac.external.vm=true
 | 
				
			||||||
javac.modulepath=
 | 
					javac.modulepath=
 | 
				
			||||||
@@ -71,7 +71,7 @@ jlink.additionalmodules=
 | 
				
			|||||||
jlink.additionalparam=
 | 
					jlink.additionalparam=
 | 
				
			||||||
jlink.launcher=true
 | 
					jlink.launcher=true
 | 
				
			||||||
jlink.launcher.name=JDR
 | 
					jlink.launcher.name=JDR
 | 
				
			||||||
main.class=jdr.JDR
 | 
					main.class=presentation.JFPlateau
 | 
				
			||||||
manifest.file=manifest.mf
 | 
					manifest.file=manifest.mf
 | 
				
			||||||
meta.inf.dir=${src.dir}/META-INF
 | 
					meta.inf.dir=${src.dir}/META-INF
 | 
				
			||||||
mkdist.disabled=false
 | 
					mkdist.disabled=false
 | 
				
			||||||
@@ -82,7 +82,7 @@ run.classpath=\
 | 
				
			|||||||
# Space-separated list of JVM arguments used when running the project.
 | 
					# Space-separated list of JVM arguments used when running the project.
 | 
				
			||||||
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
 | 
					# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
 | 
				
			||||||
# To set system properties for unit tests define test-sys-prop.name=value:
 | 
					# To set system properties for unit tests define test-sys-prop.name=value:
 | 
				
			||||||
run.jvmargs=
 | 
					run.jvmargs=\ --enable-preview
 | 
				
			||||||
run.modulepath=\
 | 
					run.modulepath=\
 | 
				
			||||||
    ${javac.modulepath}
 | 
					    ${javac.modulepath}
 | 
				
			||||||
run.test.classpath=\
 | 
					run.test.classpath=\
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										
											BIN
										
									
								
								JDR/src/img/Barbare04.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 6.6 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								JDR/src/img/Combat.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 20 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								JDR/src/img/CombatPerdu.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 26 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								JDR/src/img/Guerrier05.JPG
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.3 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								JDR/src/img/Guerrier08.JPG
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.8 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								JDR/src/img/Guerrier10.JPG
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.9 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								JDR/src/img/Guerrier12.JPG
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.5 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								JDR/src/img/Simone.JPG
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.7 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								JDR/src/img/Sorcier02.JPG
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 6.6 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								JDR/src/img/Sorciere1.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 7.5 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								JDR/src/img/adj_1.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 9.1 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								JDR/src/img/des.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 12 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								JDR/src/img/famille_1.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 12 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								JDR/src/img/magie.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 36 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								JDR/src/img/panoramix.gif
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 4.7 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								JDR/src/img/pierreFeuilleCiseaux.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 13 KiB  | 
@@ -1,21 +0,0 @@
 | 
				
			|||||||
/*
 | 
					 | 
				
			||||||
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 | 
					 | 
				
			||||||
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Main.java to edit this template
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
package jdr;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * @author sio
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
public class JDR {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * @param args the command line arguments
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public static void main(String[] args) {
 | 
					 | 
				
			||||||
        // TODO code application logic here
 | 
					 | 
				
			||||||
        System.out.println("Hello world !");
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
							
								
								
									
										32
									
								
								JDR/src/jeuderole/JeuDeRolePolymorphisme.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,32 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 | 
				
			||||||
 | 
					 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Main.java to edit this template
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package jeuderole;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import metier.Guerrier;
 | 
				
			||||||
 | 
					import metier.Personnage;
 | 
				
			||||||
 | 
					import metier.Sorcier;
 | 
				
			||||||
 | 
					import metier.Voleur;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Test Classe Jeu
 | 
				
			||||||
 | 
					 * @author famille Thevenot
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public class JeuDeRolePolymorphisme {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * @param args the command line arguments
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static void main(String[] args) {
 | 
				
			||||||
 | 
					                
 | 
				
			||||||
 | 
					    Personnage mesPersonnages[] = new Personnage[3];
 | 
				
			||||||
 | 
					    mesPersonnages[0] = new Guerrier("Guerrier", "Guerrier05.jpg", 5, 10, "couteau");
 | 
				
			||||||
 | 
					    mesPersonnages[1] = new Voleur("Voleur", "imgVoleur1", 5, 10, "crochet");
 | 
				
			||||||
 | 
					    mesPersonnages[2] = new Sorcier("Sorcier", "Sorcier02.jpg", 5, 10, "bout de bois", 10);            
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					    mesPersonnages[0].saluer(mesPersonnages[1]);
 | 
				
			||||||
 | 
					    mesPersonnages[2].saluer(mesPersonnages[0]);
 | 
				
			||||||
 | 
					    mesPersonnages[1].saluer(mesPersonnages[2]);
 | 
				
			||||||
 | 
					     }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										60
									
								
								JDR/src/metier/Enigme.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,60 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 | 
				
			||||||
 | 
					 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package metier;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.Objects;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @author mohamed.boussemaha
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public class Enigme {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private String question;
 | 
				
			||||||
 | 
					    private String reponse;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public Enigme(String question, String reponse) {
 | 
				
			||||||
 | 
					        this.question = question;
 | 
				
			||||||
 | 
					        this.reponse = reponse;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getQuestion() {
 | 
				
			||||||
 | 
					        return question;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setQuestion(String question) {
 | 
				
			||||||
 | 
					        this.question = question;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String getReponse() {
 | 
				
			||||||
 | 
					        return reponse;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setReponse(String reponse) {
 | 
				
			||||||
 | 
					        this.reponse = reponse;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public int hashCode() {
 | 
				
			||||||
 | 
					        return Objects.hash(question, reponse);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public boolean equals(Object obj) {
 | 
				
			||||||
 | 
					        if (this == obj) {
 | 
				
			||||||
 | 
					            return true;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (obj == null || getClass() != obj.getClass()) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        final Enigme other = (Enigme) obj;
 | 
				
			||||||
 | 
					        return Objects.equals(this.question, other.question) && Objects.equals(this.reponse, other.reponse);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public String toString() {
 | 
				
			||||||
 | 
					        return "Enigme{" + "question='" + question + '\'' + ", reponse='" + reponse + '\'' + '}';
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										142
									
								
								JDR/src/metier/Guerrier.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,142 @@
 | 
				
			|||||||
 | 
					package metier;
 | 
				
			||||||
 | 
					import java.util.Objects;
 | 
				
			||||||
 | 
					import javax.swing.Icon;
 | 
				
			||||||
 | 
					import javax.swing.JOptionPane;
 | 
				
			||||||
 | 
					import static javax.swing.JOptionPane.WARNING_MESSAGE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Classe Guerrier, hérite de la classe Personnage
 | 
				
			||||||
 | 
					 * @author Dominique_2
 | 
				
			||||||
 | 
					 * @version 20170115
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public class Guerrier extends Personnage{
 | 
				
			||||||
 | 
					    // Variable membre
 | 
				
			||||||
 | 
					    private String arme;
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Valorisation des variables membres
 | 
				
			||||||
 | 
					     * @param nom       nom du guerrier
 | 
				
			||||||
 | 
					     * @param img       nom de l'image représentant le guerrier
 | 
				
			||||||
 | 
					     * @param energie   valeur énergétique du guerrier
 | 
				
			||||||
 | 
					     * @param dureeVie  durée de vie du guerrier
 | 
				
			||||||
 | 
					     * @param arme      armu du guerrier
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public Guerrier(String nom, String img, int energie, int dureeVie, String arme) {
 | 
				
			||||||
 | 
					        super(nom, img, energie, dureeVie);
 | 
				
			||||||
 | 
					        this.arme = arme;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Permet d'obtenir les valeurs des attributs de l'objet courant
 | 
				
			||||||
 | 
					     * @return liste des attributs avec leurs valeurs
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public String toString() {
 | 
				
			||||||
 | 
					        return super.toString() + "\tArme=" + arme;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public int hashCode() {
 | 
				
			||||||
 | 
					        int hash = 7;
 | 
				
			||||||
 | 
					        hash = super.hashCode() + (13 * hash + Objects.hashCode(this.arme));
 | 
				
			||||||
 | 
					        return hash;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Comparaison de l'objet courant avec l'objet passé en paramètre
 | 
				
			||||||
 | 
					     * @param obj objet à comparer avec l'objet courant
 | 
				
			||||||
 | 
					     * @return true : les 2 objets sont identiques, false sinon
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public boolean equals(Object obj) {
 | 
				
			||||||
 | 
					        if (this == obj) {
 | 
				
			||||||
 | 
					            return true;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (obj == null) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (getClass() != obj.getClass()) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        final Guerrier other = (Guerrier) obj;
 | 
				
			||||||
 | 
					        if (!Objects.equals(this.arme, other.arme)) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if(!super.equals(obj)){
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Get the value of arme
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return the value of arme
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public String getArme() {
 | 
				
			||||||
 | 
					        return arme;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Set the value of arme
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @param arme new value of arme
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void setArme(String arme) {
 | 
				
			||||||
 | 
					        this.arme = arme;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @param unPerso
 | 
				
			||||||
 | 
					     * @return
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public String saluer(Personnage unPerso) {
 | 
				
			||||||
 | 
					        String titre = this.getNom() + " salue " + unPerso.getNom();
 | 
				
			||||||
 | 
					        String message = "Bonjour " + unPerso.getNom() + ", sauve-toi vite avant que je ne te frappe avec mon arme redoutable !";
 | 
				
			||||||
 | 
					        JOptionPane.showMessageDialog(null, message, titre, JOptionPane.INFORMATION_MESSAGE);
 | 
				
			||||||
 | 
					        return message;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @param unPerso
 | 
				
			||||||
 | 
					     * @return
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public String rencontrer(Personnage unPerso) {
 | 
				
			||||||
 | 
					        String titre = this.getNom() + " rencontre " + unPerso.getNom() + ": d<>fi d<>s";
 | 
				
			||||||
 | 
					        String message = "Es-tu pr<70>t <20><> me combattre " + unPerso.getNom() + "?";
 | 
				
			||||||
 | 
					        JOptionPane.showMessageDialog(null, message, titre, JOptionPane.INFORMATION_MESSAGE);
 | 
				
			||||||
 | 
					        Icon img = new javax.swing.ImageIcon(getClass().getResource("/img/des.jpg"));
 | 
				
			||||||
 | 
					        JOptionPane.showMessageDialog( null, message, titre, WARNING_MESSAGE, img);
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        int scoreAttaquant = Jeu.genererNbAleatoire(1, 6);
 | 
				
			||||||
 | 
					        int scoreAttaque = Jeu.genererNbAleatoire(1, 6);
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        if (scoreAttaquant == scoreAttaque) {
 | 
				
			||||||
 | 
					            message = "Egalit<EFBFBD> ! Vous avez tous les deux lanc<6E> " + scoreAttaquant + ". Rejoue vite !";
 | 
				
			||||||
 | 
					            JOptionPane.showMessageDialog(null, message, titre, JOptionPane.WARNING_MESSAGE);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            String gagnant = scoreAttaquant > scoreAttaque ? this.getNom() : unPerso.getNom();
 | 
				
			||||||
 | 
					            int degats = Math.abs(scoreAttaquant - scoreAttaque); 
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					            if (gagnant.equals(this.getNom())) {
 | 
				
			||||||
 | 
					                this.setEnergie(this.getEnergie() + degats);
 | 
				
			||||||
 | 
					                this.setDureeVie(this.getDureeVie() + degats);
 | 
				
			||||||
 | 
					                message = this.getNom() + " a gagn<67> ! Il inflige " + degats + " points de dommage. " +
 | 
				
			||||||
 | 
					                        "Energie: " + this.getEnergie() + ", Dur<75>e de vie: " + this.getDureeVie();
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                unPerso.setEnergie(unPerso.getEnergie() + degats);
 | 
				
			||||||
 | 
					                unPerso.setDureeVie(unPerso.getDureeVie() + degats);
 | 
				
			||||||
 | 
					                message = unPerso.getNom() + " a gagn<67> ! Il inflige " + degats + " points de dommage. " +
 | 
				
			||||||
 | 
					                        "Energie: " + unPerso.getEnergie() + ", Dur<75>e de vie: " + unPerso.getDureeVie();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					            JOptionPane.showMessageDialog(null, message, titre, JOptionPane.INFORMATION_MESSAGE);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return message;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}    
 | 
				
			||||||
							
								
								
									
										134
									
								
								JDR/src/metier/Jeu.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,134 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 | 
				
			||||||
 | 
					 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package metier;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.Vector;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @author mohamed.boussemaha
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public class Jeu {
 | 
				
			||||||
 | 
					    /*****Attributs*****/
 | 
				
			||||||
 | 
					    private final String nomJeu;
 | 
				
			||||||
 | 
					    private Personnage[] lesPersonnages;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /*****Constructeur*****/
 | 
				
			||||||
 | 
					    public Jeu(String nomJeu) {
 | 
				
			||||||
 | 
					        this.nomJeu = nomJeu;
 | 
				
			||||||
 | 
					        this.chargerLesPersonnages();         
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /*****Accesseur*****/
 | 
				
			||||||
 | 
					    public String getNomJeu() {
 | 
				
			||||||
 | 
					        return this.nomJeu;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public Personnage[] getLesPersonnages() {
 | 
				
			||||||
 | 
					        return this.lesPersonnages;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /*****Mutateurs*****/
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 
 | 
				
			||||||
 | 
					     * @param lesPersonnages 
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void setLesPersonnages(Personnage[] lesPersonnages) {
 | 
				
			||||||
 | 
					        this.lesPersonnages = lesPersonnages;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /*****M<>thodes*****/
 | 
				
			||||||
 | 
					    private void chargerLesPersonnages() {
 | 
				
			||||||
 | 
					        Enigme[] enigmes1 = {
 | 
				
			||||||
 | 
					            new Enigme("Qu?est ce qui est plus grand que la Tour Eiffel, mais infiniment moins lourd ?", "ombre"),
 | 
				
			||||||
 | 
					            new Enigme("Girafe = 3, <20>l<EFBFBD>phant = 3, Hippopotame = 5, Lion = ? ?", "2"),
 | 
				
			||||||
 | 
					            new Enigme("Qu'est-ce qui commence la nuit et termine le matin ?", "n"),
 | 
				
			||||||
 | 
					            new Enigme("Qu'est-ce qui fait le tour de la maison sans bouger ?", "mur")
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        Enigme[] enigmes2 = {
 | 
				
			||||||
 | 
					            new Enigme("Consid<EFBFBD>rez la suite de chiffre suivante : 0 1 1 2 3 5 8 Quel chiffre suit le 8 ?", "13"),
 | 
				
			||||||
 | 
					            new Enigme("Prenez une pizza et placez-la devant vous. En combien de morceaux maximum pouvez-vous la couper en effectuant seulement six coups de couteau ?", "16"),
 | 
				
			||||||
 | 
					            new Enigme("C'est le jour de la paie. La poule re<72>oit 7 euros. L'abeille re<72>oit 21 euros. L'araign<67>e re<72>oit 28 euros. Combien re<72>oit le chien ?", "14"),
 | 
				
			||||||
 | 
					            new Enigme("Un escargot est au fond d'un puits de 10 m<>tres. Chaque matin il monte de 3 m<>tres et chaque nuit il descend de 2 m<>tres. Combien de jours lui faudra-t-il pour sortir de ce puits ?", "7")
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        Sorcier sorcier1 = new Sorcier("Merlin", "merlin.png", 5, 10, "Baguette de ch<63>ne", 10);
 | 
				
			||||||
 | 
					        for (Enigme e : enigmes1) {
 | 
				
			||||||
 | 
					            sorcier1.ajouterEnigme(e);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        Sorcier sorcier2 = new Sorcier("Gandalf", "gandalf.png", 5, 10, "Baguette d'if", 10);
 | 
				
			||||||
 | 
					        for (Enigme e : enigmes2) {
 | 
				
			||||||
 | 
					            sorcier2.ajouterEnigme(e);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        Guerrier guerrier1 = new Guerrier("Guerrier 1", "Guerrier05.jpg", 5, 10, "couteau");
 | 
				
			||||||
 | 
					        Voleur voleur1 = new Voleur("Voleur 1", "imgVoleur1", 5, 10, "crochet");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        this.lesPersonnages = new Personnage[4];
 | 
				
			||||||
 | 
					        this.lesPersonnages[0] = guerrier1;
 | 
				
			||||||
 | 
					        this.lesPersonnages[1] = voleur1;
 | 
				
			||||||
 | 
					        this.lesPersonnages[2] = sorcier1;
 | 
				
			||||||
 | 
					        this.lesPersonnages[3] = sorcier2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        for (Personnage personnage : this.lesPersonnages) {
 | 
				
			||||||
 | 
					            System.out.println(personnage);  // Affiche le sorcier avec le nombre d'<27>nigmes
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 
 | 
				
			||||||
 | 
					     * @return 
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public Personnage rechercherPerso(String nom) {
 | 
				
			||||||
 | 
					        boolean trouve = false;
 | 
				
			||||||
 | 
					        int i = 0;
 | 
				
			||||||
 | 
					        while (!trouve && i < lesPersonnages.length) {
 | 
				
			||||||
 | 
					            if (lesPersonnages[i].getNom().equals(nom)) {
 | 
				
			||||||
 | 
					                trouve = true;
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                i++;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return lesPersonnages[i];
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 
 | 
				
			||||||
 | 
					     * @return 
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public Vector getLesPersonnagesVivants() {
 | 
				
			||||||
 | 
					        Vector personnageVivant = new Vector();
 | 
				
			||||||
 | 
					        for (Personnage p : lesPersonnages) {
 | 
				
			||||||
 | 
					            if (p.getDureeVie() > 0) {
 | 
				
			||||||
 | 
					                personnageVivant.add(p.getClass().getSimpleName() + ": " + p.getNom());
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return personnageVivant;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public String toString() {
 | 
				
			||||||
 | 
					        String affichage = "";
 | 
				
			||||||
 | 
					        for (Personnage personnage : this.lesPersonnages) {
 | 
				
			||||||
 | 
					            affichage += personnage + "\n";
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return affichage;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public static int genererNbAleatoire(int min, int max) {
 | 
				
			||||||
 | 
					        return min + (int)(Math.random() * ((max - min) + 1));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										199
									
								
								JDR/src/metier/Personnage.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,199 @@
 | 
				
			|||||||
 | 
					package metier;
 | 
				
			||||||
 | 
					import java.util.Objects;
 | 
				
			||||||
 | 
					import javax.swing.Icon;
 | 
				
			||||||
 | 
					import javax.swing.JOptionPane;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Classe Mère Personnage
 | 
				
			||||||
 | 
					 * @author Dominique_2
 | 
				
			||||||
 | 
					 * @version 20170215
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public class Personnage {
 | 
				
			||||||
 | 
					    // Variables membres
 | 
				
			||||||
 | 
					    private String nom;    
 | 
				
			||||||
 | 
					    private String img;      
 | 
				
			||||||
 | 
					    private int energie;
 | 
				
			||||||
 | 
					    private int dureeVie;
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Valorisation des variables membres
 | 
				
			||||||
 | 
					     * @param nom       nom du personnage
 | 
				
			||||||
 | 
					     * @param img       nom de l'image du personnage
 | 
				
			||||||
 | 
					     * @param energie   valeur énergétique  
 | 
				
			||||||
 | 
					     * @param dureeVie  durée de vie, en année 
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public Personnage(String nom, String img, int energie, int dureeVie) {
 | 
				
			||||||
 | 
					        this.nom = nom;
 | 
				
			||||||
 | 
					        this.img = img;
 | 
				
			||||||
 | 
					        this.energie = energie;
 | 
				
			||||||
 | 
					        this.dureeVie = dureeVie;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public Personnage() {
 | 
				
			||||||
 | 
					//        throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Permet d'obtenir les valeurs des attributs de l'objet courant
 | 
				
			||||||
 | 
					     * @return liste des attributs avec leurs valeurs
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public String toString() {
 | 
				
			||||||
 | 
					        return "Nom\t" + nom + "\nEnergie\t" + energie + "\nDuree de vie\t" + dureeVie 
 | 
				
			||||||
 | 
					                + "\n"+this.getClass().getSimpleName();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public int hashCode() {
 | 
				
			||||||
 | 
					        int hash = 3;
 | 
				
			||||||
 | 
					        hash = 47 * hash + Objects.hashCode(this.nom);
 | 
				
			||||||
 | 
					        hash = 47 * hash + Objects.hashCode(this.img);
 | 
				
			||||||
 | 
					        hash = 47 * hash + this.energie;
 | 
				
			||||||
 | 
					        hash = 47 * hash + this.dureeVie;
 | 
				
			||||||
 | 
					        return hash;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Comparaison de l'objet courant avec l'objet passé en paramètre
 | 
				
			||||||
 | 
					     * @param obj objet à comparer avec l'objet courant
 | 
				
			||||||
 | 
					     * @return true : les 2 objets sont identiques, false sinon
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public boolean equals(Object obj) {
 | 
				
			||||||
 | 
					        if (this == obj) {
 | 
				
			||||||
 | 
					            return true;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (obj == null) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (getClass() != obj.getClass()) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        final Personnage other = (Personnage) obj;
 | 
				
			||||||
 | 
					        if (this.energie != other.energie) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (this.dureeVie != other.dureeVie) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (!Objects.equals(this.nom, other.nom)) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return Objects.equals(this.img, other.img);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Get the value of energie
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return the value of energie
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public int getEnergie() {
 | 
				
			||||||
 | 
					        return energie;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Set the value of energie
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @param energie new value of energie
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void setEnergie(int energie) {
 | 
				
			||||||
 | 
					        this.energie = energie;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					     /**
 | 
				
			||||||
 | 
					     * Get the value of dureeVie
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return the value of dureeVie
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public int getDureeVie() {
 | 
				
			||||||
 | 
					        return dureeVie;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Set the value of dureeVie
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @param dureeVie new value of dureeVie
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void setDureeVie(int dureeVie) {
 | 
				
			||||||
 | 
					        this.dureeVie = dureeVie;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Get the value of img
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return the value of img
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public String getImg() {
 | 
				
			||||||
 | 
					        return img;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Set the value of img
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @param img new value of img
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void setImg(String img) {
 | 
				
			||||||
 | 
					        this.img = img;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Get the value of nom
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return the value of nom
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public String getNom() {
 | 
				
			||||||
 | 
					        return nom;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Set the value of nom
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @param nom new value of nom
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void setNom(String nom) {
 | 
				
			||||||
 | 
					        this.nom = nom;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @param unPerso
 | 
				
			||||||
 | 
					     * @return
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public String rencontrer(Personnage unPerso) {
 | 
				
			||||||
 | 
					        String titre = this.getNom() + " rencontre " + unPerso.getNom();
 | 
				
			||||||
 | 
					        String message = "Bonjour " + unPerso.getNom() + " !";
 | 
				
			||||||
 | 
					        JOptionPane.showMessageDialog(null, message, titre, JOptionPane.INFORMATION_MESSAGE);
 | 
				
			||||||
 | 
					        //Icon imgPerso = new javax.swing.ImageIcon(getClass().getResource("/img/" + this.getImg()));
 | 
				
			||||||
 | 
					        //JOptionPane.showMessageDialog(null, message, titre, JOptionPane.INFORMATION_MESSAGE, imgPerso);       
 | 
				
			||||||
 | 
					        return message;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    public String saluer(Personnage unPerso) {
 | 
				
			||||||
 | 
					        String titre = this.getNom() + " salue " + unPerso.getNom();
 | 
				
			||||||
 | 
					        String message = "Bonjour " + unPerso.getNom() + ", je suis content de te revoir !";
 | 
				
			||||||
 | 
					        JOptionPane.showMessageDialog(null, message, titre, JOptionPane.INFORMATION_MESSAGE);
 | 
				
			||||||
 | 
					        JOptionPane.showMessageDialog(null, message, titre, JOptionPane.INFORMATION_MESSAGE);       
 | 
				
			||||||
 | 
					        return message;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    public void varierEnergie(int nb) {
 | 
				
			||||||
 | 
					        if(this.energie + nb < 0) {
 | 
				
			||||||
 | 
					            this.energie = 0;
 | 
				
			||||||
 | 
					            JOptionPane.showMessageDialog(null, "Fin",this.getNom() + "est mort", JOptionPane.ABORT);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					            this.energie += nb;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    public void varierDureeVie(int nb) {
 | 
				
			||||||
 | 
					        if(this.dureeVie + nb <= 0) {
 | 
				
			||||||
 | 
					            this.dureeVie = 0;
 | 
				
			||||||
 | 
					            JOptionPane.showMessageDialog(null, "Fin", this.getNom() + "est mort", JOptionPane.ABORT);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					            this.dureeVie += nb;
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										87
									
								
								JDR/src/metier/Sorcier.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,87 @@
 | 
				
			|||||||
 | 
					package metier;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.Objects;
 | 
				
			||||||
 | 
					import java.util.Random;
 | 
				
			||||||
 | 
					import javax.swing.JOptionPane;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @author Dominique_2
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public class Sorcier extends Personnage {
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    private String baguette;
 | 
				
			||||||
 | 
					    private Enigme[] enigmes;
 | 
				
			||||||
 | 
					    private int nbEnigmes;
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    public Sorcier(String nom, String img, int energie, int dureeVie, String baguette, int par2) {
 | 
				
			||||||
 | 
					        super(nom, img, energie, dureeVie);
 | 
				
			||||||
 | 
					        this.baguette = baguette;
 | 
				
			||||||
 | 
					        int tailleMaxEnigmes = 0;
 | 
				
			||||||
 | 
					        this.enigmes = new Enigme[tailleMaxEnigmes];
 | 
				
			||||||
 | 
					        this.nbEnigmes = 0;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public int hashCode() {
 | 
				
			||||||
 | 
					        return Objects.hash(super.hashCode(), baguette, enigmes, nbEnigmes);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public boolean equals(Object obj) {
 | 
				
			||||||
 | 
					        if (this == obj) {
 | 
				
			||||||
 | 
					            return true;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (obj == null || getClass() != obj.getClass()) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        Sorcier other = (Sorcier) obj;
 | 
				
			||||||
 | 
					        return super.equals(obj) && Objects.equals(baguette, other.baguette) && nbEnigmes == other.nbEnigmes;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public String toString() {
 | 
				
			||||||
 | 
					        return super.toString() + "\tBaguette=" + baguette + "\nNb Enigmes=" + nbEnigmes;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    public Enigme[] getEnigmes() {
 | 
				
			||||||
 | 
					        return enigmes;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    public void ajouterEnigme(Enigme e) {
 | 
				
			||||||
 | 
					        if (nbEnigmes < enigmes.length) {
 | 
				
			||||||
 | 
					            enigmes[nbEnigmes] = e;
 | 
				
			||||||
 | 
					            nbEnigmes++;
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            System.out.println("Impossible d'ajouter une <20>nigme. Le tableau est plein.");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public String saluer(Personnage unPerso) {
 | 
				
			||||||
 | 
					        String titre = this.getNom() + " saluer " + unPerso.getNom();
 | 
				
			||||||
 | 
					        String message = "Bonjour " + unPerso.getNom() + ", je t'ai jet<65> un sort, tu es d<>sormais sous ma d<>pendance !";
 | 
				
			||||||
 | 
					        JOptionPane.showMessageDialog(null, message, titre, JOptionPane.INFORMATION_MESSAGE);
 | 
				
			||||||
 | 
					        return message;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public String rencontrer(Personnage unPerso) {
 | 
				
			||||||
 | 
					        if (nbEnigmes == 0) {
 | 
				
			||||||
 | 
					            JOptionPane.showMessageDialog(null, "Je n'ai pas d'<27>nigmes <20> te poser...", "Sorcier " + this.getNom(), JOptionPane.INFORMATION_MESSAGE);
 | 
				
			||||||
 | 
					            return "";
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        Random rand = new Random();
 | 
				
			||||||
 | 
					        Enigme enigme = enigmes[rand.nextInt(nbEnigmes)];
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        String reponseUtilisateur = JOptionPane.showInputDialog(null, enigme.getQuestion(), "R<EFBFBD>pondez <20> l'<27>nigme", JOptionPane.QUESTION_MESSAGE);
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        if (reponseUtilisateur != null && reponseUtilisateur.equalsIgnoreCase(enigme.getReponse())) {
 | 
				
			||||||
 | 
					            JOptionPane.showMessageDialog(null, "Bonne r<>ponse !", "Sorcier " + this.getNom(), JOptionPane.INFORMATION_MESSAGE);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            JOptionPane.showMessageDialog(null, "Mauvaise r<>ponse ! La bonne r<>ponse <20>tait : " + enigme.getReponse(), "Sorcier " + this.getNom(), JOptionPane.INFORMATION_MESSAGE);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return null;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										133
									
								
								JDR/src/metier/Voleur.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,133 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					* To change this license header, choose License Headers in Project Properties.
 | 
				
			||||||
 | 
					* To change this template file, choose Tools | Templates
 | 
				
			||||||
 | 
					* and open the template in the editor.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					package metier;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.Objects;
 | 
				
			||||||
 | 
					import javax.swing.Icon;
 | 
				
			||||||
 | 
					import javax.swing.JOptionPane;
 | 
				
			||||||
 | 
					import static javax.swing.JOptionPane.WARNING_MESSAGE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @author Dominique_2
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public class Voleur extends Personnage{
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    private String outil;
 | 
				
			||||||
 | 
					    private String [] outils={"Pierre","Feuille","Ciseaux"};
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    public Voleur(String nom, String img, int energie, int dureeVie, String outil) {
 | 
				
			||||||
 | 
					        super(nom, img, energie, dureeVie);
 | 
				
			||||||
 | 
					        this.outil = outil;
 | 
				
			||||||
 | 
					        //this.butin = butin;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public int hashCode() {
 | 
				
			||||||
 | 
					        int hash = 7;
 | 
				
			||||||
 | 
					        hash = super.hashCode() + (29 * hash + Objects.hashCode(this.outil));
 | 
				
			||||||
 | 
					        return hash;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @param obj
 | 
				
			||||||
 | 
					     * @return
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public boolean equals(Object obj) {
 | 
				
			||||||
 | 
					        if (this == obj) {
 | 
				
			||||||
 | 
					            return true;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (obj == null) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (getClass() != obj.getClass()) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        final Voleur other = (Voleur) obj;
 | 
				
			||||||
 | 
					        if (!Objects.equals(this.outil, other.outil)) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (!super.equals(obj)) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public String toString() {
 | 
				
			||||||
 | 
					        return super.toString() + "\t Outil=" + outil + "\nButin=";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Get the value of outil
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @return the value of outil
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public String getOutil() {
 | 
				
			||||||
 | 
					        return outil;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Set the value of outil
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @param outil new value of outil
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public void setOutil(String outil) {
 | 
				
			||||||
 | 
					        this.outil = outil;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    public String[] getOutils() {
 | 
				
			||||||
 | 
					        return outils;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    public void setOutils(String[] outils) {
 | 
				
			||||||
 | 
					        this.outils = outils;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public String rencontrer(Personnage unPerso) {
 | 
				
			||||||
 | 
					        String titre = this.getNom() + " rencontre " + unPerso.getNom();
 | 
				
			||||||
 | 
					        String message = "Que choisis-tu, " + unPerso.getNom() + "?";
 | 
				
			||||||
 | 
					        JOptionPane.showMessageDialog(null, message, titre, JOptionPane.INFORMATION_MESSAGE);
 | 
				
			||||||
 | 
					        Icon img = new javax.swing.ImageIcon(getClass().getResource("/img/pierreFeuilleCiseaux.jpg"));
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        String resultat = "";
 | 
				
			||||||
 | 
					        String choixJoueur;
 | 
				
			||||||
 | 
					        String choixAdversaire;
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        do { 
 | 
				
			||||||
 | 
					            int choixUtilisateur = JOptionPane.showOptionDialog(
 | 
				
			||||||
 | 
					                null, message, titre, JOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE,
 | 
				
			||||||
 | 
					                null, outils, 0);
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        choixJoueur = outils[choixUtilisateur];
 | 
				
			||||||
 | 
					        choixAdversaire = outils[Jeu.genererNbAleatoire(0,2)];
 | 
				
			||||||
 | 
					            if (choixJoueur.equals(choixAdversaire)) {
 | 
				
			||||||
 | 
					            resultat = "<EFBFBD>galit<EFBFBD>, recommencez !";
 | 
				
			||||||
 | 
					        } else if (
 | 
				
			||||||
 | 
					                (choixJoueur.equals("Pierre") && choixAdversaire.equals("Ciseaux")) ||
 | 
				
			||||||
 | 
					                (choixJoueur.equals("Feuille") && choixAdversaire.equals("Pierre")) ||
 | 
				
			||||||
 | 
					                (choixJoueur.equals("Ciseaux") && choixAdversaire.equals("Feuille"))
 | 
				
			||||||
 | 
					                ) {
 | 
				
			||||||
 | 
					            resultat = "Vous avez gagn<67> !";
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            resultat = "Vous avez perdu !";
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					            JOptionPane.showMessageDialog(null, "Vous avez choisi : " + choixJoueur + "\n"
 | 
				
			||||||
 | 
					                + unPerso.getNom() + " a choisi : " + choixAdversaire,
 | 
				
			||||||
 | 
					                titre, JOptionPane.INFORMATION_MESSAGE);
 | 
				
			||||||
 | 
					        } while(choixJoueur.equals(choixAdversaire));
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					                
 | 
				
			||||||
 | 
					        JOptionPane.showMessageDialog(null, resultat, titre, JOptionPane.INFORMATION_MESSAGE);
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        return resultat;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										353
									
								
								JDR/src/presentation/JFPlateau.form
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,353 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="UTF-8" ?>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
 | 
				
			||||||
 | 
					  <NonVisualComponents>
 | 
				
			||||||
 | 
					    <Container class="javax.swing.JPanel" name="jPanel1">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      <Layout>
 | 
				
			||||||
 | 
					        <DimensionLayout dim="0">
 | 
				
			||||||
 | 
					          <Group type="103" groupAlignment="0" attributes="0">
 | 
				
			||||||
 | 
					              <EmptySpace min="0" pref="100" max="32767" attributes="0"/>
 | 
				
			||||||
 | 
					          </Group>
 | 
				
			||||||
 | 
					        </DimensionLayout>
 | 
				
			||||||
 | 
					        <DimensionLayout dim="1">
 | 
				
			||||||
 | 
					          <Group type="103" groupAlignment="0" attributes="0">
 | 
				
			||||||
 | 
					              <EmptySpace min="0" pref="100" max="32767" attributes="0"/>
 | 
				
			||||||
 | 
					          </Group>
 | 
				
			||||||
 | 
					        </DimensionLayout>
 | 
				
			||||||
 | 
					      </Layout>
 | 
				
			||||||
 | 
					    </Container>
 | 
				
			||||||
 | 
					  </NonVisualComponents>
 | 
				
			||||||
 | 
					  <Properties>
 | 
				
			||||||
 | 
					    <Property name="defaultCloseOperation" type="int" value="3"/>
 | 
				
			||||||
 | 
					  </Properties>
 | 
				
			||||||
 | 
					  <SyntheticProperties>
 | 
				
			||||||
 | 
					    <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
 | 
				
			||||||
 | 
					    <SyntheticProperty name="generateCenter" type="boolean" value="false"/>
 | 
				
			||||||
 | 
					  </SyntheticProperties>
 | 
				
			||||||
 | 
					  <AuxValues>
 | 
				
			||||||
 | 
					    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
 | 
				
			||||||
 | 
					    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
 | 
				
			||||||
 | 
					    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
 | 
				
			||||||
 | 
					    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
 | 
				
			||||||
 | 
					    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
 | 
				
			||||||
 | 
					    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
 | 
				
			||||||
 | 
					    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
 | 
				
			||||||
 | 
					    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
 | 
				
			||||||
 | 
					    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
 | 
				
			||||||
 | 
					  </AuxValues>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <Layout>
 | 
				
			||||||
 | 
					    <DimensionLayout dim="0">
 | 
				
			||||||
 | 
					      <Group type="103" groupAlignment="0" attributes="0">
 | 
				
			||||||
 | 
					          <Group type="102" attributes="0">
 | 
				
			||||||
 | 
					              <Group type="103" groupAlignment="0" attributes="0">
 | 
				
			||||||
 | 
					                  <Group type="102" attributes="0">
 | 
				
			||||||
 | 
					                      <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
 | 
				
			||||||
 | 
					                      <Component id="jLabel2" min="-2" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      <EmptySpace min="-2" pref="222" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                  </Group>
 | 
				
			||||||
 | 
					                  <Group type="102" attributes="0">
 | 
				
			||||||
 | 
					                      <EmptySpace max="32767" attributes="0"/>
 | 
				
			||||||
 | 
					                      <Component id="jPanel3" min="-2" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      <EmptySpace min="-2" pref="78" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                  </Group>
 | 
				
			||||||
 | 
					                  <Group type="102" alignment="0" attributes="0">
 | 
				
			||||||
 | 
					                      <EmptySpace min="-2" pref="232" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      <Component id="jButton1" min="-2" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      <EmptySpace max="32767" attributes="0"/>
 | 
				
			||||||
 | 
					                  </Group>
 | 
				
			||||||
 | 
					              </Group>
 | 
				
			||||||
 | 
					              <Component id="jPanel2" min="-2" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					              <EmptySpace min="-2" pref="22" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					          </Group>
 | 
				
			||||||
 | 
					      </Group>
 | 
				
			||||||
 | 
					    </DimensionLayout>
 | 
				
			||||||
 | 
					    <DimensionLayout dim="1">
 | 
				
			||||||
 | 
					      <Group type="103" groupAlignment="0" attributes="0">
 | 
				
			||||||
 | 
					          <Group type="102" alignment="0" attributes="0">
 | 
				
			||||||
 | 
					              <Group type="103" groupAlignment="1" attributes="0">
 | 
				
			||||||
 | 
					                  <Component id="jPanel2" alignment="1" min="-2" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                  <Group type="102" alignment="0" attributes="0">
 | 
				
			||||||
 | 
					                      <EmptySpace min="-2" pref="31" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      <Component id="jLabel2" min="-2" pref="118" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      <EmptySpace type="separate" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      <Component id="jPanel3" min="-2" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      <EmptySpace type="separate" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      <Component id="jButton1" min="-2" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                  </Group>
 | 
				
			||||||
 | 
					              </Group>
 | 
				
			||||||
 | 
					              <EmptySpace pref="33" max="32767" attributes="0"/>
 | 
				
			||||||
 | 
					          </Group>
 | 
				
			||||||
 | 
					      </Group>
 | 
				
			||||||
 | 
					    </DimensionLayout>
 | 
				
			||||||
 | 
					  </Layout>
 | 
				
			||||||
 | 
					  <SubComponents>
 | 
				
			||||||
 | 
					    <Container class="javax.swing.JPanel" name="jPanel2">
 | 
				
			||||||
 | 
					      <Properties>
 | 
				
			||||||
 | 
					        <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
 | 
				
			||||||
 | 
					          <Color blue="0" green="0" red="33" type="rgb"/>
 | 
				
			||||||
 | 
					        </Property>
 | 
				
			||||||
 | 
					        <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
 | 
				
			||||||
 | 
					          <Color blue="33" green="33" red="33" type="rgb"/>
 | 
				
			||||||
 | 
					        </Property>
 | 
				
			||||||
 | 
					      </Properties>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      <Layout>
 | 
				
			||||||
 | 
					        <DimensionLayout dim="0">
 | 
				
			||||||
 | 
					          <Group type="103" groupAlignment="0" attributes="0">
 | 
				
			||||||
 | 
					              <Group type="102" attributes="0">
 | 
				
			||||||
 | 
					                  <EmptySpace max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                  <Group type="103" groupAlignment="0" attributes="0">
 | 
				
			||||||
 | 
					                      <Component id="jLabel1" min="-2" pref="174" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      <Component id="jScrollPane4" alignment="0" min="-2" pref="174" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                  </Group>
 | 
				
			||||||
 | 
					                  <EmptySpace max="32767" attributes="0"/>
 | 
				
			||||||
 | 
					              </Group>
 | 
				
			||||||
 | 
					          </Group>
 | 
				
			||||||
 | 
					        </DimensionLayout>
 | 
				
			||||||
 | 
					        <DimensionLayout dim="1">
 | 
				
			||||||
 | 
					          <Group type="103" groupAlignment="0" attributes="0">
 | 
				
			||||||
 | 
					              <Group type="102" alignment="0" attributes="0">
 | 
				
			||||||
 | 
					                  <EmptySpace max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                  <Component id="jLabel1" min="-2" pref="85" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                  <EmptySpace type="unrelated" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                  <Component id="jScrollPane4" pref="387" max="32767" attributes="0"/>
 | 
				
			||||||
 | 
					                  <EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					              </Group>
 | 
				
			||||||
 | 
					          </Group>
 | 
				
			||||||
 | 
					        </DimensionLayout>
 | 
				
			||||||
 | 
					      </Layout>
 | 
				
			||||||
 | 
					      <SubComponents>
 | 
				
			||||||
 | 
					        <Component class="javax.swing.JLabel" name="jLabel1">
 | 
				
			||||||
 | 
					          <Properties>
 | 
				
			||||||
 | 
					            <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
 | 
				
			||||||
 | 
					              <Image iconType="3" name="/img/adj_1.jpg"/>
 | 
				
			||||||
 | 
					            </Property>
 | 
				
			||||||
 | 
					          </Properties>
 | 
				
			||||||
 | 
					        </Component>
 | 
				
			||||||
 | 
					        <Container class="javax.swing.JScrollPane" name="jScrollPane4">
 | 
				
			||||||
 | 
					          <AuxValues>
 | 
				
			||||||
 | 
					            <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
 | 
				
			||||||
 | 
					          </AuxValues>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
 | 
				
			||||||
 | 
					          <SubComponents>
 | 
				
			||||||
 | 
					            <Component class="javax.swing.JTextArea" name="jTextArea4">
 | 
				
			||||||
 | 
					              <Properties>
 | 
				
			||||||
 | 
					                <Property name="editable" type="boolean" value="false"/>
 | 
				
			||||||
 | 
					                <Property name="columns" type="int" value="20"/>
 | 
				
			||||||
 | 
					                <Property name="rows" type="int" value="5"/>
 | 
				
			||||||
 | 
					              </Properties>
 | 
				
			||||||
 | 
					            </Component>
 | 
				
			||||||
 | 
					          </SubComponents>
 | 
				
			||||||
 | 
					        </Container>
 | 
				
			||||||
 | 
					      </SubComponents>
 | 
				
			||||||
 | 
					    </Container>
 | 
				
			||||||
 | 
					    <Component class="javax.swing.JLabel" name="jLabel2">
 | 
				
			||||||
 | 
					      <Properties>
 | 
				
			||||||
 | 
					        <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
 | 
				
			||||||
 | 
					          <Image iconType="3" name="/img/famille_1.jpg"/>
 | 
				
			||||||
 | 
					        </Property>
 | 
				
			||||||
 | 
					      </Properties>
 | 
				
			||||||
 | 
					    </Component>
 | 
				
			||||||
 | 
					    <Container class="javax.swing.JPanel" name="jPanel3">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      <Layout>
 | 
				
			||||||
 | 
					        <DimensionLayout dim="0">
 | 
				
			||||||
 | 
					          <Group type="103" groupAlignment="0" attributes="0">
 | 
				
			||||||
 | 
					              <Group type="102" alignment="1" attributes="0">
 | 
				
			||||||
 | 
					                  <EmptySpace pref="10" max="32767" attributes="0"/>
 | 
				
			||||||
 | 
					                  <Group type="103" groupAlignment="0" max="-2" attributes="0">
 | 
				
			||||||
 | 
					                      <Group type="102" attributes="0">
 | 
				
			||||||
 | 
					                          <Component id="jCPerso1" min="-2" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                          <EmptySpace max="32767" attributes="0"/>
 | 
				
			||||||
 | 
					                          <Component id="jCPerso2" min="-2" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      </Group>
 | 
				
			||||||
 | 
					                      <Group type="102" attributes="0">
 | 
				
			||||||
 | 
					                          <Component id="jPanel4" min="-2" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                          <EmptySpace type="separate" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                          <Component id="jPanel6" min="-2" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      </Group>
 | 
				
			||||||
 | 
					                  </Group>
 | 
				
			||||||
 | 
					              </Group>
 | 
				
			||||||
 | 
					          </Group>
 | 
				
			||||||
 | 
					        </DimensionLayout>
 | 
				
			||||||
 | 
					        <DimensionLayout dim="1">
 | 
				
			||||||
 | 
					          <Group type="103" groupAlignment="0" attributes="0">
 | 
				
			||||||
 | 
					              <Group type="102" alignment="0" attributes="0">
 | 
				
			||||||
 | 
					                  <EmptySpace max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                  <Group type="103" groupAlignment="3" attributes="0">
 | 
				
			||||||
 | 
					                      <Component id="jCPerso1" alignment="3" min="-2" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      <Component id="jCPerso2" alignment="3" min="-2" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                  </Group>
 | 
				
			||||||
 | 
					                  <EmptySpace max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                  <Group type="103" groupAlignment="0" max="-2" attributes="0">
 | 
				
			||||||
 | 
					                      <Component id="jPanel4" max="32767" attributes="0"/>
 | 
				
			||||||
 | 
					                      <Component id="jPanel6" max="32767" attributes="0"/>
 | 
				
			||||||
 | 
					                  </Group>
 | 
				
			||||||
 | 
					                  <EmptySpace pref="16" max="32767" attributes="0"/>
 | 
				
			||||||
 | 
					              </Group>
 | 
				
			||||||
 | 
					          </Group>
 | 
				
			||||||
 | 
					        </DimensionLayout>
 | 
				
			||||||
 | 
					      </Layout>
 | 
				
			||||||
 | 
					      <SubComponents>
 | 
				
			||||||
 | 
					        <Component class="javax.swing.JComboBox" name="jCPerso1">
 | 
				
			||||||
 | 
					          <Properties>
 | 
				
			||||||
 | 
					            <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
 | 
				
			||||||
 | 
					              <StringArray count="4">
 | 
				
			||||||
 | 
					                <StringItem index="0" value="Item 1"/>
 | 
				
			||||||
 | 
					                <StringItem index="1" value="Item 2"/>
 | 
				
			||||||
 | 
					                <StringItem index="2" value="Item 3"/>
 | 
				
			||||||
 | 
					                <StringItem index="3" value="Item 4"/>
 | 
				
			||||||
 | 
					              </StringArray>
 | 
				
			||||||
 | 
					            </Property>
 | 
				
			||||||
 | 
					          </Properties>
 | 
				
			||||||
 | 
					          <Events>
 | 
				
			||||||
 | 
					            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jCPerso1ActionPerformed"/>
 | 
				
			||||||
 | 
					          </Events>
 | 
				
			||||||
 | 
					          <AuxValues>
 | 
				
			||||||
 | 
					            <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/>
 | 
				
			||||||
 | 
					          </AuxValues>
 | 
				
			||||||
 | 
					        </Component>
 | 
				
			||||||
 | 
					        <Component class="javax.swing.JComboBox" name="jCPerso2">
 | 
				
			||||||
 | 
					          <Properties>
 | 
				
			||||||
 | 
					            <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
 | 
				
			||||||
 | 
					              <StringArray count="4">
 | 
				
			||||||
 | 
					                <StringItem index="0" value="Item 1"/>
 | 
				
			||||||
 | 
					                <StringItem index="1" value="Item 2"/>
 | 
				
			||||||
 | 
					                <StringItem index="2" value="Item 3"/>
 | 
				
			||||||
 | 
					                <StringItem index="3" value="Item 4"/>
 | 
				
			||||||
 | 
					              </StringArray>
 | 
				
			||||||
 | 
					            </Property>
 | 
				
			||||||
 | 
					          </Properties>
 | 
				
			||||||
 | 
					          <Events>
 | 
				
			||||||
 | 
					            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jCPerso2ActionPerformed"/>
 | 
				
			||||||
 | 
					          </Events>
 | 
				
			||||||
 | 
					          <AuxValues>
 | 
				
			||||||
 | 
					            <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/>
 | 
				
			||||||
 | 
					          </AuxValues>
 | 
				
			||||||
 | 
					        </Component>
 | 
				
			||||||
 | 
					        <Container class="javax.swing.JPanel" name="jPanel4">
 | 
				
			||||||
 | 
					          <Properties>
 | 
				
			||||||
 | 
					            <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
 | 
				
			||||||
 | 
					              <Color blue="0" green="0" red="66" type="rgb"/>
 | 
				
			||||||
 | 
					            </Property>
 | 
				
			||||||
 | 
					          </Properties>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          <Layout>
 | 
				
			||||||
 | 
					            <DimensionLayout dim="0">
 | 
				
			||||||
 | 
					              <Group type="103" groupAlignment="0" attributes="0">
 | 
				
			||||||
 | 
					                  <Group type="102" attributes="0">
 | 
				
			||||||
 | 
					                      <EmptySpace max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      <Group type="103" groupAlignment="0" attributes="0">
 | 
				
			||||||
 | 
					                          <Component id="jScrollPane2" max="32767" attributes="0"/>
 | 
				
			||||||
 | 
					                          <Group type="102" alignment="0" attributes="0">
 | 
				
			||||||
 | 
					                              <Component id="jLabel4" min="-2" pref="100" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                              <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
 | 
				
			||||||
 | 
					                          </Group>
 | 
				
			||||||
 | 
					                      </Group>
 | 
				
			||||||
 | 
					                      <EmptySpace max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                  </Group>
 | 
				
			||||||
 | 
					              </Group>
 | 
				
			||||||
 | 
					            </DimensionLayout>
 | 
				
			||||||
 | 
					            <DimensionLayout dim="1">
 | 
				
			||||||
 | 
					              <Group type="103" groupAlignment="0" attributes="0">
 | 
				
			||||||
 | 
					                  <Group type="102" alignment="1" attributes="0">
 | 
				
			||||||
 | 
					                      <EmptySpace max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      <Component id="jScrollPane2" min="-2" pref="120" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      <EmptySpace pref="28" max="32767" attributes="0"/>
 | 
				
			||||||
 | 
					                      <Component id="jLabel4" min="-2" pref="90" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      <EmptySpace max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                  </Group>
 | 
				
			||||||
 | 
					              </Group>
 | 
				
			||||||
 | 
					            </DimensionLayout>
 | 
				
			||||||
 | 
					          </Layout>
 | 
				
			||||||
 | 
					          <SubComponents>
 | 
				
			||||||
 | 
					            <Component class="javax.swing.JLabel" name="jLabel4">
 | 
				
			||||||
 | 
					            </Component>
 | 
				
			||||||
 | 
					            <Container class="javax.swing.JScrollPane" name="jScrollPane2">
 | 
				
			||||||
 | 
					              <AuxValues>
 | 
				
			||||||
 | 
					                <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
 | 
				
			||||||
 | 
					              </AuxValues>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
 | 
				
			||||||
 | 
					              <SubComponents>
 | 
				
			||||||
 | 
					                <Component class="javax.swing.JTextArea" name="jTextArea2">
 | 
				
			||||||
 | 
					                  <Properties>
 | 
				
			||||||
 | 
					                    <Property name="editable" type="boolean" value="false"/>
 | 
				
			||||||
 | 
					                    <Property name="columns" type="int" value="20"/>
 | 
				
			||||||
 | 
					                    <Property name="rows" type="int" value="5"/>
 | 
				
			||||||
 | 
					                  </Properties>
 | 
				
			||||||
 | 
					                </Component>
 | 
				
			||||||
 | 
					              </SubComponents>
 | 
				
			||||||
 | 
					            </Container>
 | 
				
			||||||
 | 
					          </SubComponents>
 | 
				
			||||||
 | 
					        </Container>
 | 
				
			||||||
 | 
					        <Container class="javax.swing.JPanel" name="jPanel6">
 | 
				
			||||||
 | 
					          <Properties>
 | 
				
			||||||
 | 
					            <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
 | 
				
			||||||
 | 
					              <Color blue="0" green="0" red="66" type="rgb"/>
 | 
				
			||||||
 | 
					            </Property>
 | 
				
			||||||
 | 
					          </Properties>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          <Layout>
 | 
				
			||||||
 | 
					            <DimensionLayout dim="0">
 | 
				
			||||||
 | 
					              <Group type="103" groupAlignment="0" attributes="0">
 | 
				
			||||||
 | 
					                  <Group type="102" alignment="0" attributes="0">
 | 
				
			||||||
 | 
					                      <EmptySpace max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      <Component id="jLabel3" min="-2" pref="99" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      <EmptySpace max="32767" attributes="0"/>
 | 
				
			||||||
 | 
					                  </Group>
 | 
				
			||||||
 | 
					                  <Group type="102" alignment="1" attributes="0">
 | 
				
			||||||
 | 
					                      <EmptySpace max="32767" attributes="0"/>
 | 
				
			||||||
 | 
					                      <Component id="jScrollPane3" min="-2" pref="234" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      <EmptySpace max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                  </Group>
 | 
				
			||||||
 | 
					              </Group>
 | 
				
			||||||
 | 
					            </DimensionLayout>
 | 
				
			||||||
 | 
					            <DimensionLayout dim="1">
 | 
				
			||||||
 | 
					              <Group type="103" groupAlignment="0" attributes="0">
 | 
				
			||||||
 | 
					                  <Group type="102" alignment="1" attributes="0">
 | 
				
			||||||
 | 
					                      <EmptySpace max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      <Component id="jScrollPane3" min="-2" pref="120" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      <EmptySpace max="32767" attributes="0"/>
 | 
				
			||||||
 | 
					                      <Component id="jLabel3" min="-2" pref="90" max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                      <EmptySpace max="-2" attributes="0"/>
 | 
				
			||||||
 | 
					                  </Group>
 | 
				
			||||||
 | 
					              </Group>
 | 
				
			||||||
 | 
					            </DimensionLayout>
 | 
				
			||||||
 | 
					          </Layout>
 | 
				
			||||||
 | 
					          <SubComponents>
 | 
				
			||||||
 | 
					            <Component class="javax.swing.JLabel" name="jLabel3">
 | 
				
			||||||
 | 
					            </Component>
 | 
				
			||||||
 | 
					            <Container class="javax.swing.JScrollPane" name="jScrollPane3">
 | 
				
			||||||
 | 
					              <AuxValues>
 | 
				
			||||||
 | 
					                <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
 | 
				
			||||||
 | 
					              </AuxValues>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
 | 
				
			||||||
 | 
					              <SubComponents>
 | 
				
			||||||
 | 
					                <Component class="javax.swing.JTextArea" name="jTextArea3">
 | 
				
			||||||
 | 
					                  <Properties>
 | 
				
			||||||
 | 
					                    <Property name="editable" type="boolean" value="false"/>
 | 
				
			||||||
 | 
					                    <Property name="columns" type="int" value="20"/>
 | 
				
			||||||
 | 
					                    <Property name="rows" type="int" value="5"/>
 | 
				
			||||||
 | 
					                  </Properties>
 | 
				
			||||||
 | 
					                </Component>
 | 
				
			||||||
 | 
					              </SubComponents>
 | 
				
			||||||
 | 
					            </Container>
 | 
				
			||||||
 | 
					          </SubComponents>
 | 
				
			||||||
 | 
					        </Container>
 | 
				
			||||||
 | 
					      </SubComponents>
 | 
				
			||||||
 | 
					    </Container>
 | 
				
			||||||
 | 
					    <Component class="javax.swing.JButton" name="jButton1">
 | 
				
			||||||
 | 
					      <Properties>
 | 
				
			||||||
 | 
					        <Property name="text" type="java.lang.String" value="GO"/>
 | 
				
			||||||
 | 
					      </Properties>
 | 
				
			||||||
 | 
					      <Events>
 | 
				
			||||||
 | 
					        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
 | 
				
			||||||
 | 
					      </Events>
 | 
				
			||||||
 | 
					    </Component>
 | 
				
			||||||
 | 
					  </SubComponents>
 | 
				
			||||||
 | 
					</Form>
 | 
				
			||||||
							
								
								
									
										342
									
								
								JDR/src/presentation/JFPlateau.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,342 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 | 
				
			||||||
 | 
					 * Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this template
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package presentation;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.Vector;
 | 
				
			||||||
 | 
					import javax.swing.DefaultComboBoxModel;
 | 
				
			||||||
 | 
					import metier.Jeu;
 | 
				
			||||||
 | 
					import metier.Personnage;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @author mohamed.boussemaha
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public class JFPlateau extends javax.swing.JFrame {
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Creates new form JFPlateau
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    Jeu jeu = new Jeu("Mon Jeu");
 | 
				
			||||||
 | 
					    Personnage p1;
 | 
				
			||||||
 | 
					    Personnage p2;
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    public JFPlateau() {
 | 
				
			||||||
 | 
					        initComponents();
 | 
				
			||||||
 | 
					        majTF();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    public void majTF() {
 | 
				
			||||||
 | 
					        jCPerso1.setModel( new DefaultComboBoxModel(jeu.getLesPersonnagesVivants()));
 | 
				
			||||||
 | 
					        jCPerso2.setModel( new DefaultComboBoxModel(jeu.getLesPersonnagesVivants()));
 | 
				
			||||||
 | 
					        jCPerso1.setSelectedIndex(0);
 | 
				
			||||||
 | 
					        jCPerso2.setSelectedIndex(0);
 | 
				
			||||||
 | 
					        String perso = (String) jCPerso1.getSelectedItem();
 | 
				
			||||||
 | 
					        String nomPerso = perso.split(": ")[1];
 | 
				
			||||||
 | 
					        p1 = jeu.rechercherPerso(nomPerso);
 | 
				
			||||||
 | 
					        jTextArea2.setText(p1.toString());
 | 
				
			||||||
 | 
					        perso = (String) jCPerso2.getSelectedItem();
 | 
				
			||||||
 | 
					        nomPerso = perso.split(": ")[1];
 | 
				
			||||||
 | 
					        p2 = jeu.rechercherPerso(nomPerso);
 | 
				
			||||||
 | 
					        jTextArea3.setText(p2.toString());
 | 
				
			||||||
 | 
					        String ttPerso = "";
 | 
				
			||||||
 | 
					        for (Personnage p : jeu.getLesPersonnages()) {
 | 
				
			||||||
 | 
					            ttPerso += p+"\n";
 | 
				
			||||||
 | 
					        }   
 | 
				
			||||||
 | 
					        jTextArea4.setText(ttPerso);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * This method is called from within the constructor to initialize the form.
 | 
				
			||||||
 | 
					     * WARNING: Do NOT modify this code. The content of this method is always
 | 
				
			||||||
 | 
					     * regenerated by the Form Editor.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @SuppressWarnings("unchecked")
 | 
				
			||||||
 | 
					    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
 | 
				
			||||||
 | 
					    private void initComponents() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        jPanel1 = new javax.swing.JPanel();
 | 
				
			||||||
 | 
					        jPanel2 = new javax.swing.JPanel();
 | 
				
			||||||
 | 
					        jLabel1 = new javax.swing.JLabel();
 | 
				
			||||||
 | 
					        jScrollPane4 = new javax.swing.JScrollPane();
 | 
				
			||||||
 | 
					        jTextArea4 = new javax.swing.JTextArea();
 | 
				
			||||||
 | 
					        jLabel2 = new javax.swing.JLabel();
 | 
				
			||||||
 | 
					        jPanel3 = new javax.swing.JPanel();
 | 
				
			||||||
 | 
					        jCPerso1 = new javax.swing.JComboBox<>();
 | 
				
			||||||
 | 
					        jCPerso2 = new javax.swing.JComboBox<>();
 | 
				
			||||||
 | 
					        jPanel4 = new javax.swing.JPanel();
 | 
				
			||||||
 | 
					        jLabel4 = new javax.swing.JLabel();
 | 
				
			||||||
 | 
					        jScrollPane2 = new javax.swing.JScrollPane();
 | 
				
			||||||
 | 
					        jTextArea2 = new javax.swing.JTextArea();
 | 
				
			||||||
 | 
					        jPanel6 = new javax.swing.JPanel();
 | 
				
			||||||
 | 
					        jLabel3 = new javax.swing.JLabel();
 | 
				
			||||||
 | 
					        jScrollPane3 = new javax.swing.JScrollPane();
 | 
				
			||||||
 | 
					        jTextArea3 = new javax.swing.JTextArea();
 | 
				
			||||||
 | 
					        jButton1 = new javax.swing.JButton();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
 | 
				
			||||||
 | 
					        jPanel1.setLayout(jPanel1Layout);
 | 
				
			||||||
 | 
					        jPanel1Layout.setHorizontalGroup(
 | 
				
			||||||
 | 
					            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 | 
				
			||||||
 | 
					            .addGap(0, 100, Short.MAX_VALUE)
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					        jPanel1Layout.setVerticalGroup(
 | 
				
			||||||
 | 
					            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 | 
				
			||||||
 | 
					            .addGap(0, 100, Short.MAX_VALUE)
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        jPanel2.setBackground(new java.awt.Color(51, 0, 0));
 | 
				
			||||||
 | 
					        jPanel2.setForeground(new java.awt.Color(51, 51, 51));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/adj_1.jpg"))); // NOI18N
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        jTextArea4.setEditable(false);
 | 
				
			||||||
 | 
					        jTextArea4.setColumns(20);
 | 
				
			||||||
 | 
					        jTextArea4.setRows(5);
 | 
				
			||||||
 | 
					        jScrollPane4.setViewportView(jTextArea4);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
 | 
				
			||||||
 | 
					        jPanel2.setLayout(jPanel2Layout);
 | 
				
			||||||
 | 
					        jPanel2Layout.setHorizontalGroup(
 | 
				
			||||||
 | 
					            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 | 
				
			||||||
 | 
					            .addGroup(jPanel2Layout.createSequentialGroup()
 | 
				
			||||||
 | 
					                .addContainerGap()
 | 
				
			||||||
 | 
					                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 | 
				
			||||||
 | 
					                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE)
 | 
				
			||||||
 | 
					                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE))
 | 
				
			||||||
 | 
					                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					        jPanel2Layout.setVerticalGroup(
 | 
				
			||||||
 | 
					            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 | 
				
			||||||
 | 
					            .addGroup(jPanel2Layout.createSequentialGroup()
 | 
				
			||||||
 | 
					                .addContainerGap()
 | 
				
			||||||
 | 
					                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
 | 
				
			||||||
 | 
					                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
 | 
				
			||||||
 | 
					                .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 387, Short.MAX_VALUE)
 | 
				
			||||||
 | 
					                .addGap(12, 12, 12))
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/famille_1.jpg"))); // NOI18N
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        jCPerso1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
 | 
				
			||||||
 | 
					        jCPerso1.addActionListener(new java.awt.event.ActionListener() {
 | 
				
			||||||
 | 
					            public void actionPerformed(java.awt.event.ActionEvent evt) {
 | 
				
			||||||
 | 
					                jCPerso1ActionPerformed(evt);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        jCPerso2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
 | 
				
			||||||
 | 
					        jCPerso2.addActionListener(new java.awt.event.ActionListener() {
 | 
				
			||||||
 | 
					            public void actionPerformed(java.awt.event.ActionEvent evt) {
 | 
				
			||||||
 | 
					                jCPerso2ActionPerformed(evt);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        jPanel4.setBackground(new java.awt.Color(102, 0, 0));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        jTextArea2.setEditable(false);
 | 
				
			||||||
 | 
					        jTextArea2.setColumns(20);
 | 
				
			||||||
 | 
					        jTextArea2.setRows(5);
 | 
				
			||||||
 | 
					        jScrollPane2.setViewportView(jTextArea2);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
 | 
				
			||||||
 | 
					        jPanel4.setLayout(jPanel4Layout);
 | 
				
			||||||
 | 
					        jPanel4Layout.setHorizontalGroup(
 | 
				
			||||||
 | 
					            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 | 
				
			||||||
 | 
					            .addGroup(jPanel4Layout.createSequentialGroup()
 | 
				
			||||||
 | 
					                .addContainerGap()
 | 
				
			||||||
 | 
					                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 | 
				
			||||||
 | 
					                    .addComponent(jScrollPane2)
 | 
				
			||||||
 | 
					                    .addGroup(jPanel4Layout.createSequentialGroup()
 | 
				
			||||||
 | 
					                        .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
 | 
				
			||||||
 | 
					                        .addGap(0, 0, Short.MAX_VALUE)))
 | 
				
			||||||
 | 
					                .addContainerGap())
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					        jPanel4Layout.setVerticalGroup(
 | 
				
			||||||
 | 
					            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 | 
				
			||||||
 | 
					            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
 | 
				
			||||||
 | 
					                .addContainerGap()
 | 
				
			||||||
 | 
					                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
 | 
				
			||||||
 | 
					                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE)
 | 
				
			||||||
 | 
					                .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
 | 
				
			||||||
 | 
					                .addContainerGap())
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        jPanel6.setBackground(new java.awt.Color(102, 0, 0));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        jTextArea3.setEditable(false);
 | 
				
			||||||
 | 
					        jTextArea3.setColumns(20);
 | 
				
			||||||
 | 
					        jTextArea3.setRows(5);
 | 
				
			||||||
 | 
					        jScrollPane3.setViewportView(jTextArea3);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
 | 
				
			||||||
 | 
					        jPanel6.setLayout(jPanel6Layout);
 | 
				
			||||||
 | 
					        jPanel6Layout.setHorizontalGroup(
 | 
				
			||||||
 | 
					            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 | 
				
			||||||
 | 
					            .addGroup(jPanel6Layout.createSequentialGroup()
 | 
				
			||||||
 | 
					                .addContainerGap()
 | 
				
			||||||
 | 
					                .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
 | 
				
			||||||
 | 
					                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
 | 
				
			||||||
 | 
					            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
 | 
				
			||||||
 | 
					                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 | 
				
			||||||
 | 
					                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 234, javax.swing.GroupLayout.PREFERRED_SIZE)
 | 
				
			||||||
 | 
					                .addContainerGap())
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					        jPanel6Layout.setVerticalGroup(
 | 
				
			||||||
 | 
					            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 | 
				
			||||||
 | 
					            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
 | 
				
			||||||
 | 
					                .addContainerGap()
 | 
				
			||||||
 | 
					                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
 | 
				
			||||||
 | 
					                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 | 
				
			||||||
 | 
					                .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
 | 
				
			||||||
 | 
					                .addContainerGap())
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
 | 
				
			||||||
 | 
					        jPanel3.setLayout(jPanel3Layout);
 | 
				
			||||||
 | 
					        jPanel3Layout.setHorizontalGroup(
 | 
				
			||||||
 | 
					            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 | 
				
			||||||
 | 
					            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
 | 
				
			||||||
 | 
					                .addContainerGap(10, Short.MAX_VALUE)
 | 
				
			||||||
 | 
					                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
 | 
				
			||||||
 | 
					                    .addGroup(jPanel3Layout.createSequentialGroup()
 | 
				
			||||||
 | 
					                        .addComponent(jCPerso1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 | 
				
			||||||
 | 
					                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 | 
				
			||||||
 | 
					                        .addComponent(jCPerso2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
 | 
				
			||||||
 | 
					                    .addGroup(jPanel3Layout.createSequentialGroup()
 | 
				
			||||||
 | 
					                        .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 | 
				
			||||||
 | 
					                        .addGap(18, 18, 18)
 | 
				
			||||||
 | 
					                        .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					        jPanel3Layout.setVerticalGroup(
 | 
				
			||||||
 | 
					            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 | 
				
			||||||
 | 
					            .addGroup(jPanel3Layout.createSequentialGroup()
 | 
				
			||||||
 | 
					                .addContainerGap()
 | 
				
			||||||
 | 
					                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 | 
				
			||||||
 | 
					                    .addComponent(jCPerso1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 | 
				
			||||||
 | 
					                    .addComponent(jCPerso2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
 | 
				
			||||||
 | 
					                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
 | 
				
			||||||
 | 
					                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
 | 
				
			||||||
 | 
					                    .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 | 
				
			||||||
 | 
					                    .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
 | 
				
			||||||
 | 
					                .addContainerGap(16, Short.MAX_VALUE))
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        jButton1.setText("GO");
 | 
				
			||||||
 | 
					        jButton1.addActionListener(new java.awt.event.ActionListener() {
 | 
				
			||||||
 | 
					            public void actionPerformed(java.awt.event.ActionEvent evt) {
 | 
				
			||||||
 | 
					                jButton1ActionPerformed(evt);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
 | 
				
			||||||
 | 
					        getContentPane().setLayout(layout);
 | 
				
			||||||
 | 
					        layout.setHorizontalGroup(
 | 
				
			||||||
 | 
					            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 | 
				
			||||||
 | 
					            .addGroup(layout.createSequentialGroup()
 | 
				
			||||||
 | 
					                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 | 
				
			||||||
 | 
					                    .addGroup(layout.createSequentialGroup()
 | 
				
			||||||
 | 
					                        .addGap(0, 0, Short.MAX_VALUE)
 | 
				
			||||||
 | 
					                        .addComponent(jLabel2)
 | 
				
			||||||
 | 
					                        .addGap(222, 222, 222))
 | 
				
			||||||
 | 
					                    .addGroup(layout.createSequentialGroup()
 | 
				
			||||||
 | 
					                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 | 
				
			||||||
 | 
					                        .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 | 
				
			||||||
 | 
					                        .addGap(78, 78, 78))
 | 
				
			||||||
 | 
					                    .addGroup(layout.createSequentialGroup()
 | 
				
			||||||
 | 
					                        .addGap(232, 232, 232)
 | 
				
			||||||
 | 
					                        .addComponent(jButton1)
 | 
				
			||||||
 | 
					                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
 | 
				
			||||||
 | 
					                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 | 
				
			||||||
 | 
					                .addGap(22, 22, 22))
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					        layout.setVerticalGroup(
 | 
				
			||||||
 | 
					            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 | 
				
			||||||
 | 
					            .addGroup(layout.createSequentialGroup()
 | 
				
			||||||
 | 
					                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
 | 
				
			||||||
 | 
					                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 | 
				
			||||||
 | 
					                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
 | 
				
			||||||
 | 
					                        .addGap(31, 31, 31)
 | 
				
			||||||
 | 
					                        .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)
 | 
				
			||||||
 | 
					                        .addGap(18, 18, 18)
 | 
				
			||||||
 | 
					                        .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 | 
				
			||||||
 | 
					                        .addGap(18, 18, 18)
 | 
				
			||||||
 | 
					                        .addComponent(jButton1)))
 | 
				
			||||||
 | 
					                .addContainerGap(33, Short.MAX_VALUE))
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        pack();
 | 
				
			||||||
 | 
					    }// </editor-fold>//GEN-END:initComponents
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void jCPerso2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCPerso2ActionPerformed
 | 
				
			||||||
 | 
					        String perso = (String) jCPerso2.getSelectedItem();
 | 
				
			||||||
 | 
					        String nomPerso = perso.split(": ")[1];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        p2 = jeu.rechercherPerso(nomPerso);
 | 
				
			||||||
 | 
					        jTextArea3.setText(p2.toString());
 | 
				
			||||||
 | 
					    }//GEN-LAST:event_jCPerso2ActionPerformed
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
 | 
				
			||||||
 | 
					        p1.rencontrer(p2);
 | 
				
			||||||
 | 
					        majTF();
 | 
				
			||||||
 | 
					    }//GEN-LAST:event_jButton1ActionPerformed
 | 
				
			||||||
 | 
					    private void jCPerso1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCPerso1ActionPerformed
 | 
				
			||||||
 | 
					        String perso = (String) jCPerso1.getSelectedItem();
 | 
				
			||||||
 | 
					        String nomPerso = perso.split(": ")[1];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        p1 = jeu.rechercherPerso(nomPerso);
 | 
				
			||||||
 | 
					        jTextArea2.setText(p1.toString());
 | 
				
			||||||
 | 
					    }//GEN-LAST:event_jCPerso1ActionPerformed
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * @param args the command line arguments
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static void main(String args[]) {
 | 
				
			||||||
 | 
					        /* Set the Nimbus look and feel */
 | 
				
			||||||
 | 
					        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
 | 
				
			||||||
 | 
					        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
 | 
				
			||||||
 | 
					         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
 | 
				
			||||||
 | 
					         */
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
 | 
				
			||||||
 | 
					                if ("Nimbus".equals(info.getName())) {
 | 
				
			||||||
 | 
					                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
 | 
				
			||||||
 | 
					                    break;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
 | 
				
			||||||
 | 
					            java.util.logging.Logger.getLogger(JFPlateau.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        //</editor-fold>
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        //</editor-fold>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /* Create and display the form */
 | 
				
			||||||
 | 
					        java.awt.EventQueue.invokeLater(() -> {
 | 
				
			||||||
 | 
					            new JFPlateau().setVisible(true);
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Variables declaration - do not modify//GEN-BEGIN:variables
 | 
				
			||||||
 | 
					    private javax.swing.JButton jButton1;
 | 
				
			||||||
 | 
					    private javax.swing.JComboBox<String> jCPerso1;
 | 
				
			||||||
 | 
					    private javax.swing.JComboBox<String> jCPerso2;
 | 
				
			||||||
 | 
					    private javax.swing.JLabel jLabel1;
 | 
				
			||||||
 | 
					    private javax.swing.JLabel jLabel2;
 | 
				
			||||||
 | 
					    private javax.swing.JLabel jLabel3;
 | 
				
			||||||
 | 
					    private javax.swing.JLabel jLabel4;
 | 
				
			||||||
 | 
					    private javax.swing.JPanel jPanel1;
 | 
				
			||||||
 | 
					    private javax.swing.JPanel jPanel2;
 | 
				
			||||||
 | 
					    private javax.swing.JPanel jPanel3;
 | 
				
			||||||
 | 
					    private javax.swing.JPanel jPanel4;
 | 
				
			||||||
 | 
					    private javax.swing.JPanel jPanel6;
 | 
				
			||||||
 | 
					    private javax.swing.JScrollPane jScrollPane2;
 | 
				
			||||||
 | 
					    private javax.swing.JScrollPane jScrollPane3;
 | 
				
			||||||
 | 
					    private javax.swing.JScrollPane jScrollPane4;
 | 
				
			||||||
 | 
					    private javax.swing.JTextArea jTextArea2;
 | 
				
			||||||
 | 
					    private javax.swing.JTextArea jTextArea3;
 | 
				
			||||||
 | 
					    private javax.swing.JTextArea jTextArea4;
 | 
				
			||||||
 | 
					    // End of variables declaration//GEN-END:variables
 | 
				
			||||||
 | 
					}
 | 
				
			||||||