commit 068f9156f95442e8db4ffe68f4e5a813a45b7dfb Author: Clement Bouillot Date: Fri May 28 10:56:04 2021 +0200 NetBeansProjects diff --git a/sioa/NetBeansProjects/Authentification24/affichageCompteRendu.php b/sioa/NetBeansProjects/Authentification24/affichageCompteRendu.php new file mode 100644 index 0000000..6bfb881 --- /dev/null +++ b/sioa/NetBeansProjects/Authentification24/affichageCompteRendu.php @@ -0,0 +1,40 @@ + + +

Liste des comptes rendu

+ + + + + + + + + + $msg

"; + unset($_GET["msg"]); + } +//Recherche des visites de l'utilisateur afin de les afficher + $dbh = connexion(); + $visites = rechercherLesComptesRendusDuCommercial($dbh, $id); + while ($unCompteRendu = $visites->fetch()) { // Lecture 1ère ligne jeu d'enregistrements + $idCompteRendu = $unCompteRendu['idCompteRendu']; + $lib = $unCompteRendu['praNom'] . " " . $unCompteRendu['praPrenom']; + $dateV = $unCompteRendu["date"]; + $heureV = $unCompteRendu["heure"]; + $rem = $unCompteRendu["remarque"]; + $cptRendu = $unCompteRendu['compteRendu']; + echo ""; + } + ?> + +
Client Date Heure Remarque Compte rendu
$lib $dateV $heureV $rem $cptRendu Ajout comptes rendus
+ + diff --git a/sioa/NetBeansProjects/Authentification24/affichageVisite.php b/sioa/NetBeansProjects/Authentification24/affichageVisite.php new file mode 100644 index 0000000..cdb3917 --- /dev/null +++ b/sioa/NetBeansProjects/Authentification24/affichageVisite.php @@ -0,0 +1,47 @@ + + +

Liste des visites

+ + + + + + + + + + $msg

"; + unset($_GET["msg"]); + } +//Recherche des visites de l'utilisateur afin de les afficher + $dbh = connexion(); + $visites = rechercherLesVisitesDuCommercial($dbh, $id); + while ($uneVisite = $visites->fetch()) { // Lecture 1ère ligne jeu d'enregistrements + $idVisite = $uneVisite['idVisite']; + $lib = $uneVisite['praNom'] . " " . $uneVisite['praPrenom']; + $ville = $uneVisite['praVille']; + $dateV = $uneVisite["date"]; + $heureV = $uneVisite["heure"]; + $rem = $uneVisite["remarque"]; + echo "" + . ""; + } + ?> + +
Client Ville Date Heure Remarque
$lib $ville $dateV $heureV $rem Comptes rendus
+


+ + + + + diff --git a/sioa/NetBeansProjects/Authentification24/ajoutCompteRendu.php b/sioa/NetBeansProjects/Authentification24/ajoutCompteRendu.php new file mode 100644 index 0000000..55a6d87 --- /dev/null +++ b/sioa/NetBeansProjects/Authentification24/ajoutCompteRendu.php @@ -0,0 +1,41 @@ + +

Nouveau compte rendu

+
+ + +

+ + + + +

+ + +

+ +
+$message

"; + } +?> + + \ No newline at end of file diff --git a/sioa/NetBeansProjects/Authentification24/deconnexion.php b/sioa/NetBeansProjects/Authentification24/deconnexion.php new file mode 100644 index 0000000..3421282 --- /dev/null +++ b/sioa/NetBeansProjects/Authentification24/deconnexion.php @@ -0,0 +1,8 @@ + + + + + + + + Gestion des visites - V4 + + +

+ identifié : + Déconnexion +

+

Organisation des visites clients

+ diff --git a/sioa/NetBeansProjects/Authentification24/index.php b/sioa/NetBeansProjects/Authentification24/index.php new file mode 100644 index 0000000..3630534 --- /dev/null +++ b/sioa/NetBeansProjects/Authentification24/index.php @@ -0,0 +1,30 @@ + + + + + + Authentification V3.1 + + +

Authentification

+
+ + + + +

+ +
+ $msg

"; + } + ?> + + diff --git a/sioa/NetBeansProjects/Authentification24/modele/accesBDD.php b/sioa/NetBeansProjects/Authentification24/modele/accesBDD.php new file mode 100644 index 0000000..fa5df1e --- /dev/null +++ b/sioa/NetBeansProjects/Authentification24/modele/accesBDD.php @@ -0,0 +1,177 @@ + true, // Connexion persistante + PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\'')); + } catch (PDOException $e) { + erreurSQL($e->getMessage(), "Pb connexion", $dbh); + } + return $dbh; +} + +/** + * Ajout de l'utilisateur dont les données sont passée en paramètre + * @param type $dbh chaine de connexion + * @param type $nom nom du nouvel utilisateur + * @param type $prenom prenom du nouvel utilisateur + * @param type $mail courriel du nouvel utilisateur + * @param type $login login, qui devra être unique + * @param type $mdp mot de passe + */ +function ajouterUtilisateur($dbh, $nom, $prenom, $mail, $login, $mdp) { + $ajout = false; + if (!existLogin($dbh, $login)) { + //echo("
mdpChiffre : " . $mdpChiffre); + $mdpChiffre = password_hash($mdp, PASSWORD_DEFAULT); //************ Chiffrement + $sql = "INSERT INTO utilisateur VALUES (NULL, '$nom', '$prenom', '$mail', '$login', '$mdpChiffre');"; + $resultat = $dbh->exec($sql); + if ($resultat === false) { + erreurSQL("Pb lors de l ajout d un utilisateur.", $sql, $dbh); + } + $ajout = true; + } + return $ajout; +} + +/** + * Recherche si le login existe déjà + * @param type $dbh Connexion + * @param type $login pseudo à vérifier + * @return type booléen, true si le login existe + */ +function existLogin($dbh, $login) { + $sql = "SELECT COUNT(*) FROM utilisateur WHERE login = '$login';"; + $resultat = $dbh->query($sql); // Execution de la requete + if ($resultat === false) { + erreurSQL("Pb lors de la recherche du login.", $sql, $dbh); + } + $count = $resultat->fetchColumn(); // Retourne la valeur de la 1ère col de la ligne suivante (param 0 par défaut) + return ($count > 0); +} + +/** afficherErreurSQL : + * Ajout message d'erreur dans le fichier log, fin de l'application + * @param $message : message a afficher + * @param $req : requete executee + * @param $dbh : connexion PDO + */ +function erreurSQL($message, $req, $dbh) { + error_log("\n***Erreur SQL*** " . date('Y-m-d H-i-s') . "\tAdresse IP : " . getIp(), TYPE_LOG, DEBUG_SQL); + error_log("\n\tMessage: " . $message, TYPE_LOG, DEBUG_SQL); + error_log("\n\tRequete: " . $req, TYPE_LOG, DEBUG_SQL); + if ($dbh) { + //$erreur = print_r($dbh->errorInfo(), true); + $erreur = $dbh->errorInfo()[2]; + error_log("\n\tErreur: " . $erreur, TYPE_LOG, DEBUG_SQL); + } + //echo("Taille log : " . stat(DEBUG_SQL)[7]); + //echo(" - Date dernière modif : " . date("d m Y H:i:s.", filemtime(DEBUG_SQL))); + if (isset($_SESSION)) { + session_unset(); + session_destroy(); + } + die("

Désolé, site actuellement indisponible

"); +} + +/** + * Controle de l'utilisateur, mot de passe non chiffré + * @param type $dbh + * @param type $pseudo + * @param type $mdp + * @return type utilisateur trouvé ou false sinon; + */ +function rechercherUtilisateur($dbh, $login, $mdp) { + $sql = "SELECT * FROM utilisateur WHERE login = '$login' AND mdp = '$mdp';"; + $resultat = $dbh->query($sql); // Execution de la requete + if ($resultat === false) { + erreurSQL("Pb lors de la recherche de l utilisateur.", $sql, $dbh); + } + return $resultat->fetch(); +} + +/** + * Recherche de tous les clients + * @param type $dbh + * @return type jeu d'enregistrements + */ +function rechercherLesClients($dbh) { + $sql = "SELECT * FROM client ORDER BY codePostal;"; + $resultat = $dbh->query($sql); // Execution de la requete + if ($resultat === false) { + erreurSQL("Pb lors de la recherche des clients.", $sql, $dbh); + } + return $resultat; +} + + +/** + * Controle de l'utilisateur, mot de passe chiffré + * @param type $dbh + * @param type $login + * @param type $mdp + * @return type false si le contrôle a échoué, l'utilisateur sinon + */ +function controlerUtilisateur($dbh, $login, $mdp) { + $sql = "SELECT * FROM utilisateur WHERE login = '$login';"; + $resultat = $dbh->query($sql); // Execution de la requete + if ($resultat === false) { + erreurSQL("Pb lors de la recherche de l utilisateur.", $sql, $dbh); + } + $user = $resultat->fetch(); + $hash = $user ? $user["mdp"] : " "; + return password_verify($mdp, $hash) ? $user : false; +} + +/** + * Récupération adresse IP du client + * @return type + */ +function getIp() { + if (!empty($_SERVER['HTTP_CLIENT_IP'])) { + $ip = $_SERVER['HTTP_CLIENT_IP']; + } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { + $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; + } else { + $ip = $_SERVER['REMOTE_ADDR']; + } + return $ip; +} + +function rechercherLesVisitesDuCommercial($dbh, $id) { + $sql = "SELECT idVisite, praNom, praPrenom, praVille, date, heure, remarque FROM visite INNER JOIN praticien ON visite.praNum= praticien.praNum ORDER BY date, heure"; + $resultat = $dbh->query($sql); // Execution de la requete + if ($resultat === false) { + erreurSQL("Pb lors de la recherche des visites.", $sql, $dbh); + } + return $resultat; +} + +function rechercherLesComptesRendusDuCommercial($dbh, $idVisite){ + $sql = "SELECT idCompteRendu, praNom, praPrenom, visite.date, visite.heure, remarque, compteRendu FROM comptesRendus INNER JOIN visite ON visite.idVisite= comptesRendus.idVisite NATURAL JOIN praticien WHERE visite.idVisite = $idVisite"; + $resultat = $dbh->query($sql); // Execution de la requete + if ($resultat === false) { + erreurSQL("Pb lors de la recherche des comptes rendus.", $sql, $dbh); + } + return $resultat; +} + diff --git a/sioa/NetBeansProjects/Authentification24/moduleResponsable.php b/sioa/NetBeansProjects/Authentification24/moduleResponsable.php new file mode 100644 index 0000000..a172a5f --- /dev/null +++ b/sioa/NetBeansProjects/Authentification24/moduleResponsable.php @@ -0,0 +1,9 @@ + +

Module responsable

+ +
module en cours de construction
+ + diff --git a/sioa/NetBeansProjects/Authentification24/nbproject/private/config.properties b/sioa/NetBeansProjects/Authentification24/nbproject/private/config.properties new file mode 100644 index 0000000..e69de29 diff --git a/sioa/NetBeansProjects/Authentification24/nbproject/private/private.properties b/sioa/NetBeansProjects/Authentification24/nbproject/private/private.properties new file mode 100644 index 0000000..887d381 --- /dev/null +++ b/sioa/NetBeansProjects/Authentification24/nbproject/private/private.properties @@ -0,0 +1,4 @@ +copy.src.on.open=false +index.file=index.php +run.as=LOCAL +url=http://localhost/PHPProjects/Authentification25 diff --git a/sioa/NetBeansProjects/Authentification24/nbproject/private/private.xml b/sioa/NetBeansProjects/Authentification24/nbproject/private/private.xml new file mode 100644 index 0000000..1671823 --- /dev/null +++ b/sioa/NetBeansProjects/Authentification24/nbproject/private/private.xml @@ -0,0 +1,18 @@ + + + + + + file:/home/clement.bouillot/NetBeansProjects/Authentification24/affichageVisite.php + file:/home/clement.bouillot/NetBeansProjects/Authentification24/moduleResponsable.php + file:/home/clement.bouillot/NetBeansProjects/Authentification24/validInscription.php + file:/home/clement.bouillot/NetBeansProjects/Authentification24/entete.php + file:/home/clement.bouillot/NetBeansProjects/Authentification24/nouvelleVisite.php + file:/home/clement.bouillot/NetBeansProjects/Authentification24/index.php + file:/home/clement.bouillot/NetBeansProjects/Authentification24/verifLogin.php + file:/home/clement.bouillot/NetBeansProjects/Authentification24/affichageCompteRendu.php + file:/home/clement.bouillot/NetBeansProjects/Authentification24/ajoutCompteRendu.php + file:/home/clement.bouillot/NetBeansProjects/Authentification24/deconnexion.php + + + diff --git a/sioa/NetBeansProjects/Authentification24/nbproject/project.properties b/sioa/NetBeansProjects/Authentification24/nbproject/project.properties new file mode 100644 index 0000000..c0c2ef4 --- /dev/null +++ b/sioa/NetBeansProjects/Authentification24/nbproject/project.properties @@ -0,0 +1,7 @@ +include.path=${php.global.include.path} +php.version=PHP_73 +source.encoding=UTF-8 +src.dir=. +tags.asp=false +tags.short=false +web.root=. diff --git a/sioa/NetBeansProjects/Authentification24/nbproject/project.xml b/sioa/NetBeansProjects/Authentification24/nbproject/project.xml new file mode 100644 index 0000000..bcb626c --- /dev/null +++ b/sioa/NetBeansProjects/Authentification24/nbproject/project.xml @@ -0,0 +1,9 @@ + + + org.netbeans.modules.php.project + + + Authentification2 + + + diff --git a/sioa/NetBeansProjects/Authentification24/nouvelleVisite.php b/sioa/NetBeansProjects/Authentification24/nouvelleVisite.php new file mode 100644 index 0000000..8343ebc --- /dev/null +++ b/sioa/NetBeansProjects/Authentification24/nouvelleVisite.php @@ -0,0 +1,44 @@ + + +

Nouvelle visite

+
+ + +

+ + + + +

+ + +

+ +
+$message

"; + } +?> + + diff --git a/sioa/NetBeansProjects/Authentification24/validInscription.php b/sioa/NetBeansProjects/Authentification24/validInscription.php new file mode 100644 index 0000000..b558202 --- /dev/null +++ b/sioa/NetBeansProjects/Authentification24/validInscription.php @@ -0,0 +1,61 @@ +Les données de l'inscription sont validées"; +for($i=0; $i"; +} + +// Test +/*$script = ""; +$texte = "Bonjour Èric ".$script ; +echo $script; // Sans filtre +$mess = filter_var($texte, FILTER_SANITIZE_SPECIAL_CHARS); +echo ("
texte : $mess"); */ + +// Ajout de l'utilisateur dans la base de données +require_once('modele/accesBDD.php'); +$dbh = connexion(); +if (ajouterUtilisateur($dbh, $data['ztNom'], $data['ztPrenom'], $data['ztMail'], $data['ztLogin'], $data['ztMdp'])) { + $message = "

Votre compte a été créé, vous pouvez désormais vous authentifier

"; + header("location:index.php?msg=$message"); +} else { + $message = "

Désolé, ce login n'est pas possible

"; + header("location:inscription.php?msg=$message"); +} \ No newline at end of file diff --git a/sioa/NetBeansProjects/Authentification24/verifLogin.php b/sioa/NetBeansProjects/Authentification24/verifLogin.php new file mode 100644 index 0000000..9239b9f --- /dev/null +++ b/sioa/NetBeansProjects/Authentification24/verifLogin.php @@ -0,0 +1,68 @@ +Login saisi : $login, mot de passe saisi : $mdp

"; +// Contrôle login et mot de passe +//if ($login == "tintin" and $mdp == "milou"){ +// echo "

Bienvenue $loginAuthentification réussie, bienvenue " . $user['prenom'] . " " . $user['nom'] . "

"; +} else { + $message = "Login ou mot de passe erroné"; + header("location:index.php?msg=$message"); + exit(); +} + + + diff --git a/sioa/NetBeansProjects/ChasseAuTresor/build.xml b/sioa/NetBeansProjects/ChasseAuTresor/build.xml new file mode 100644 index 0000000..2223931 --- /dev/null +++ b/sioa/NetBeansProjects/ChasseAuTresor/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project ChasseAuTresor. + + + diff --git a/sioa/NetBeansProjects/ChasseAuTresor/manifest.mf b/sioa/NetBeansProjects/ChasseAuTresor/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/sioa/NetBeansProjects/ChasseAuTresor/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/sioa/NetBeansProjects/ChasseAuTresor/nbproject/build-impl.xml b/sioa/NetBeansProjects/ChasseAuTresor/nbproject/build-impl.xml new file mode 100644 index 0000000..3afefb4 --- /dev/null +++ b/sioa/NetBeansProjects/ChasseAuTresor/nbproject/build-impl.xml @@ -0,0 +1,1770 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sioa/NetBeansProjects/ChasseAuTresor/nbproject/genfiles.properties b/sioa/NetBeansProjects/ChasseAuTresor/nbproject/genfiles.properties new file mode 100644 index 0000000..f132b77 --- /dev/null +++ b/sioa/NetBeansProjects/ChasseAuTresor/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=0c18b458 +build.xml.script.CRC32=aa46bd7d +build.xml.stylesheet.CRC32=f85dc8f2@1.95.0.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=0c18b458 +nbproject/build-impl.xml.script.CRC32=37e2ad13 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.95.0.48 diff --git a/sioa/NetBeansProjects/ChasseAuTresor/nbproject/private/private.properties b/sioa/NetBeansProjects/ChasseAuTresor/nbproject/private/private.properties new file mode 100644 index 0000000..90c7814 --- /dev/null +++ b/sioa/NetBeansProjects/ChasseAuTresor/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=/home/clement.bouillot/.netbeans/12.0/build.properties diff --git a/sioa/NetBeansProjects/ChasseAuTresor/nbproject/project.properties b/sioa/NetBeansProjects/ChasseAuTresor/nbproject/project.properties new file mode 100644 index 0000000..e208760 --- /dev/null +++ b/sioa/NetBeansProjects/ChasseAuTresor/nbproject/project.properties @@ -0,0 +1,95 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.modulepath=\ + ${run.modulepath} +debug.test.classpath=\ + ${run.test.classpath} +debug.test.modulepath=\ + ${run.test.modulepath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/ChasseAuTresor.jar +dist.javadoc.dir=${dist.dir}/javadoc +dist.jlink.dir=${dist.dir}/jlink +dist.jlink.output=${dist.jlink.dir}/ChasseAuTresor +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.modulepath= +javac.processormodulepath= +javac.processorpath=\ + ${javac.classpath} +javac.source=11 +javac.target=11 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.modulepath=\ + ${javac.modulepath} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.html5=false +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +# The jlink additional root modules to resolve +jlink.additionalmodules= +# The jlink additional command line parameters +jlink.additionalparam= +jlink.launcher=true +jlink.launcher.name=ChasseAuTresor +main.class=chasseautresor.ChasseAuTresor +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# 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. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.modulepath=\ + ${javac.modulepath} +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +run.test.modulepath=\ + ${javac.test.modulepath} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/sioa/NetBeansProjects/ChasseAuTresor/nbproject/project.xml b/sioa/NetBeansProjects/ChasseAuTresor/nbproject/project.xml new file mode 100644 index 0000000..69ca1dd --- /dev/null +++ b/sioa/NetBeansProjects/ChasseAuTresor/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + ChasseAuTresor + + + + + + + + + diff --git a/sioa/NetBeansProjects/ChasseAuTresor/src/chasseautresor/ChasseAuTresor.java b/sioa/NetBeansProjects/ChasseAuTresor/src/chasseautresor/ChasseAuTresor.java new file mode 100644 index 0000000..e53caf7 --- /dev/null +++ b/sioa/NetBeansProjects/ChasseAuTresor/src/chasseautresor/ChasseAuTresor.java @@ -0,0 +1,21 @@ +/* + * 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 chasseautresor; + +/** + * + * @author clement.bouillot + */ +public class ChasseAuTresor { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + // TODO code application logic here + } + +} diff --git a/sioa/NetBeansProjects/ChasseAuTresor/src/métier/joueur.java b/sioa/NetBeansProjects/ChasseAuTresor/src/métier/joueur.java new file mode 100644 index 0000000..ae96676 --- /dev/null +++ b/sioa/NetBeansProjects/ChasseAuTresor/src/métier/joueur.java @@ -0,0 +1,14 @@ +/* + * 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 métier; + +/** + * + * @author clement.bouillot + */ +public class joueur { + +} diff --git a/sioa/NetBeansProjects/ChasseAuTresor/src/métier/position.java b/sioa/NetBeansProjects/ChasseAuTresor/src/métier/position.java new file mode 100644 index 0000000..7f5b1fa --- /dev/null +++ b/sioa/NetBeansProjects/ChasseAuTresor/src/métier/position.java @@ -0,0 +1,14 @@ +/* + * 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 métier; + +/** + * + * @author clement.bouillot + */ +public class position { + +} diff --git a/sioa/NetBeansProjects/GSB prototype/manifest.mf b/sioa/NetBeansProjects/GSB prototype/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/sioa/NetBeansProjects/GSB prototype/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/sioa/NetBeansProjects/GSB prototype/src/gsb/prototype/GSBPrototype.java b/sioa/NetBeansProjects/GSB prototype/src/gsb/prototype/GSBPrototype.java new file mode 100644 index 0000000..5579a91 --- /dev/null +++ b/sioa/NetBeansProjects/GSB prototype/src/gsb/prototype/GSBPrototype.java @@ -0,0 +1,21 @@ +/* + * 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 gsb.prototype; + +/** + * + * @author clement.bouillot + */ +public class GSBPrototype { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + // TODO code application logic here + } + +} diff --git a/sioa/NetBeansProjects/GSB prototype/src/gsb/prototype/JFormGSB.form b/sioa/NetBeansProjects/GSB prototype/src/gsb/prototype/JFormGSB.form new file mode 100644 index 0000000..7467e81 --- /dev/null +++ b/sioa/NetBeansProjects/GSB prototype/src/gsb/prototype/JFormGSB.form @@ -0,0 +1,35 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/sioa/NetBeansProjects/GSB prototype/src/gsb/prototype/JFormGSB.java b/sioa/NetBeansProjects/GSB prototype/src/gsb/prototype/JFormGSB.java new file mode 100644 index 0000000..8f9c4d3 --- /dev/null +++ b/sioa/NetBeansProjects/GSB prototype/src/gsb/prototype/JFormGSB.java @@ -0,0 +1,83 @@ +/* + * 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 gsb.prototype; + +/** + * + * @author clement.bouillot + */ +public class JFormGSB extends javax.swing.JFrame { + + /** + * Creates new form JFormGSB + */ + public JFormGSB() { + initComponents(); + } + + /** + * 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") + // //GEN-BEGIN:initComponents + private void initComponents() { + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 474, Short.MAX_VALUE) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 422, Short.MAX_VALUE) + ); + + pack(); + }// //GEN-END:initComponents + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + // + /* 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 ex) { + java.util.logging.Logger.getLogger(JFormGSB.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(JFormGSB.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(JFormGSB.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(JFormGSB.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + // + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new JFormGSB().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + // End of variables declaration//GEN-END:variables +} diff --git a/sioa/NetBeansProjects/JeuDeRole2/build.xml b/sioa/NetBeansProjects/JeuDeRole2/build.xml new file mode 100644 index 0000000..51bb822 --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRole2/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project JeuDeRole2. + + + diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/built-jar.properties b/sioa/NetBeansProjects/JeuDeRole2/build/built-jar.properties new file mode 100644 index 0000000..a791f0d --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRole2/build/built-jar.properties @@ -0,0 +1,4 @@ +#Wed, 05 May 2021 09:30:40 +0200 + + +/home/clement.bouillot/NetBeansProjects/JeuDeRole2= diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Barbare04.jpg b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Barbare04.jpg new file mode 100644 index 0000000..6b1c7f5 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Barbare04.jpg differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Combat.jpg b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Combat.jpg new file mode 100644 index 0000000..24c29bb Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Combat.jpg differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/CombatPerdu.jpg b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/CombatPerdu.jpg new file mode 100644 index 0000000..55244b3 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/CombatPerdu.jpg differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Guerrier05.JPG b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Guerrier05.JPG new file mode 100644 index 0000000..628ae2d Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Guerrier05.JPG differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Guerrier08.JPG b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Guerrier08.JPG new file mode 100644 index 0000000..57b7dd7 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Guerrier08.JPG differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Guerrier10.JPG b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Guerrier10.JPG new file mode 100644 index 0000000..98c475a Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Guerrier10.JPG differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Guerrier12.JPG b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Guerrier12.JPG new file mode 100644 index 0000000..884c5ab Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Guerrier12.JPG differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Simone.JPG b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Simone.JPG new file mode 100644 index 0000000..4f47ff5 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Simone.JPG differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Sorcier02.JPG b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Sorcier02.JPG new file mode 100644 index 0000000..86afc05 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Sorcier02.JPG differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Sorciere1.jpg b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Sorciere1.jpg new file mode 100644 index 0000000..57cac9d Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/Sorciere1.jpg differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/adj_1.jpg b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/adj_1.jpg new file mode 100644 index 0000000..a6e3d8b Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/adj_1.jpg differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/des.jpg b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/des.jpg new file mode 100644 index 0000000..4ab6874 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/des.jpg differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/famille_1.jpg b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/famille_1.jpg new file mode 100644 index 0000000..0ce6eb6 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/famille_1.jpg differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/imgSup.zip b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/imgSup.zip new file mode 100644 index 0000000..99687b7 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/imgSup.zip differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/magie.jpg b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/magie.jpg new file mode 100644 index 0000000..ca36156 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/magie.jpg differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/panoramix.gif b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/panoramix.gif new file mode 100644 index 0000000..ed4f989 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/panoramix.gif differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/pierreFeuilleCiseaux.jpg b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/pierreFeuilleCiseaux.jpg new file mode 100644 index 0000000..4bb2ecf Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/img/pierreFeuilleCiseaux.jpg differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/jeuderole/JeuDeRole.class b/sioa/NetBeansProjects/JeuDeRole2/build/classes/jeuderole/JeuDeRole.class new file mode 100644 index 0000000..292be1d Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/jeuderole/JeuDeRole.class differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/jeuderole2/JeuDeRole2.class b/sioa/NetBeansProjects/JeuDeRole2/build/classes/jeuderole2/JeuDeRole2.class new file mode 100644 index 0000000..c33e8e5 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/jeuderole2/JeuDeRole2.class differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/metier/Enigme.class b/sioa/NetBeansProjects/JeuDeRole2/build/classes/metier/Enigme.class new file mode 100644 index 0000000..6ae55ba Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/metier/Enigme.class differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/metier/Guerrier.class b/sioa/NetBeansProjects/JeuDeRole2/build/classes/metier/Guerrier.class new file mode 100644 index 0000000..81ca615 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/metier/Guerrier.class differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/metier/Jeu.class b/sioa/NetBeansProjects/JeuDeRole2/build/classes/metier/Jeu.class new file mode 100644 index 0000000..09f4f59 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/metier/Jeu.class differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/metier/Personnage.class b/sioa/NetBeansProjects/JeuDeRole2/build/classes/metier/Personnage.class new file mode 100644 index 0000000..71825e1 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/metier/Personnage.class differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/metier/Sorcier.class b/sioa/NetBeansProjects/JeuDeRole2/build/classes/metier/Sorcier.class new file mode 100644 index 0000000..f677e8a Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/metier/Sorcier.class differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/build/classes/metier/Voleur.class b/sioa/NetBeansProjects/JeuDeRole2/build/classes/metier/Voleur.class new file mode 100644 index 0000000..87ee923 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/build/classes/metier/Voleur.class differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/manifest.mf b/sioa/NetBeansProjects/JeuDeRole2/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRole2/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/sioa/NetBeansProjects/JeuDeRole2/nbproject/build-impl.xml b/sioa/NetBeansProjects/JeuDeRole2/nbproject/build-impl.xml new file mode 100644 index 0000000..0fbe3eb --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRole2/nbproject/build-impl.xml @@ -0,0 +1,1770 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sioa/NetBeansProjects/JeuDeRole2/nbproject/genfiles.properties b/sioa/NetBeansProjects/JeuDeRole2/nbproject/genfiles.properties new file mode 100644 index 0000000..b737229 --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRole2/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=17786340 +build.xml.script.CRC32=221123fd +build.xml.stylesheet.CRC32=f85dc8f2@1.95.0.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=17786340 +nbproject/build-impl.xml.script.CRC32=f1457fcd +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.95.0.48 diff --git a/sioa/NetBeansProjects/JeuDeRole2/nbproject/private/private.properties b/sioa/NetBeansProjects/JeuDeRole2/nbproject/private/private.properties new file mode 100644 index 0000000..90c7814 --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRole2/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=/home/clement.bouillot/.netbeans/12.0/build.properties diff --git a/sioa/NetBeansProjects/JeuDeRole2/nbproject/private/private.xml b/sioa/NetBeansProjects/JeuDeRole2/nbproject/private/private.xml new file mode 100644 index 0000000..3c94a8c --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRole2/nbproject/private/private.xml @@ -0,0 +1,16 @@ + + + + + + file:/home/clement.bouillot/NetBeansProjects/JeuDeRole2/src/metier/Personnage.java + file:/home/clement.bouillot/NetBeansProjects/JeuDeRole2/src/metier/Voleur.java + file:/home/clement.bouillot/NetBeansProjects/JeuDeRole2/src/metier/Affrontement.java + file:/home/clement.bouillot/NetBeansProjects/JeuDeRole2/src/jeuderole/JeuDeRole.java + file:/home/clement.bouillot/NetBeansProjects/JeuDeRole2/src/metier/Enigme.java + file:/home/clement.bouillot/NetBeansProjects/JeuDeRole2/src/metier/Sorcier.java + file:/home/clement.bouillot/NetBeansProjects/JeuDeRole2/src/metier/Jeu.java + file:/home/clement.bouillot/NetBeansProjects/JeuDeRole2/src/metier/Guerrier.java + + + diff --git a/sioa/NetBeansProjects/JeuDeRole2/nbproject/project.properties b/sioa/NetBeansProjects/JeuDeRole2/nbproject/project.properties new file mode 100644 index 0000000..4fa05a9 --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRole2/nbproject/project.properties @@ -0,0 +1,95 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.modulepath=\ + ${run.modulepath} +debug.test.classpath=\ + ${run.test.classpath} +debug.test.modulepath=\ + ${run.test.modulepath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/JeuDeRole2.jar +dist.javadoc.dir=${dist.dir}/javadoc +dist.jlink.dir=${dist.dir}/jlink +dist.jlink.output=${dist.jlink.dir}/JeuDeRole2 +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.modulepath= +javac.processormodulepath= +javac.processorpath=\ + ${javac.classpath} +javac.source=11 +javac.target=11 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.modulepath=\ + ${javac.modulepath} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.html5=false +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +# The jlink additional root modules to resolve +jlink.additionalmodules= +# The jlink additional command line parameters +jlink.additionalparam= +jlink.launcher=true +jlink.launcher.name=JeuDeRole2 +main.class=jeuderole.JeuDeRole +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# 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. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.modulepath=\ + ${javac.modulepath} +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +run.test.modulepath=\ + ${javac.test.modulepath} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/sioa/NetBeansProjects/JeuDeRole2/nbproject/project.xml b/sioa/NetBeansProjects/JeuDeRole2/nbproject/project.xml new file mode 100644 index 0000000..8ca10e6 --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRole2/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + JeuDeRole2 + + + + + + + + + diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/img/Barbare04.jpg b/sioa/NetBeansProjects/JeuDeRole2/src/img/Barbare04.jpg new file mode 100644 index 0000000..6b1c7f5 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/src/img/Barbare04.jpg differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/img/Combat.jpg b/sioa/NetBeansProjects/JeuDeRole2/src/img/Combat.jpg new file mode 100644 index 0000000..24c29bb Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/src/img/Combat.jpg differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/img/CombatPerdu.jpg b/sioa/NetBeansProjects/JeuDeRole2/src/img/CombatPerdu.jpg new file mode 100644 index 0000000..55244b3 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/src/img/CombatPerdu.jpg differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/img/Guerrier05.JPG b/sioa/NetBeansProjects/JeuDeRole2/src/img/Guerrier05.JPG new file mode 100644 index 0000000..628ae2d Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/src/img/Guerrier05.JPG differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/img/Guerrier08.JPG b/sioa/NetBeansProjects/JeuDeRole2/src/img/Guerrier08.JPG new file mode 100644 index 0000000..57b7dd7 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/src/img/Guerrier08.JPG differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/img/Guerrier10.JPG b/sioa/NetBeansProjects/JeuDeRole2/src/img/Guerrier10.JPG new file mode 100644 index 0000000..98c475a Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/src/img/Guerrier10.JPG differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/img/Guerrier12.JPG b/sioa/NetBeansProjects/JeuDeRole2/src/img/Guerrier12.JPG new file mode 100644 index 0000000..884c5ab Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/src/img/Guerrier12.JPG differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/img/Simone.JPG b/sioa/NetBeansProjects/JeuDeRole2/src/img/Simone.JPG new file mode 100644 index 0000000..4f47ff5 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/src/img/Simone.JPG differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/img/Sorcier02.JPG b/sioa/NetBeansProjects/JeuDeRole2/src/img/Sorcier02.JPG new file mode 100644 index 0000000..86afc05 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/src/img/Sorcier02.JPG differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/img/Sorciere1.jpg b/sioa/NetBeansProjects/JeuDeRole2/src/img/Sorciere1.jpg new file mode 100644 index 0000000..57cac9d Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/src/img/Sorciere1.jpg differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/img/adj_1.jpg b/sioa/NetBeansProjects/JeuDeRole2/src/img/adj_1.jpg new file mode 100644 index 0000000..a6e3d8b Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/src/img/adj_1.jpg differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/img/des.jpg b/sioa/NetBeansProjects/JeuDeRole2/src/img/des.jpg new file mode 100644 index 0000000..4ab6874 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/src/img/des.jpg differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/img/famille_1.jpg b/sioa/NetBeansProjects/JeuDeRole2/src/img/famille_1.jpg new file mode 100644 index 0000000..0ce6eb6 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/src/img/famille_1.jpg differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/img/magie.jpg b/sioa/NetBeansProjects/JeuDeRole2/src/img/magie.jpg new file mode 100644 index 0000000..ca36156 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/src/img/magie.jpg differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/img/panoramix.gif b/sioa/NetBeansProjects/JeuDeRole2/src/img/panoramix.gif new file mode 100644 index 0000000..ed4f989 Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/src/img/panoramix.gif differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/img/pierreFeuilleCiseaux.jpg b/sioa/NetBeansProjects/JeuDeRole2/src/img/pierreFeuilleCiseaux.jpg new file mode 100644 index 0000000..4bb2ecf Binary files /dev/null and b/sioa/NetBeansProjects/JeuDeRole2/src/img/pierreFeuilleCiseaux.jpg differ diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/jeuderole/JeuDeRole.java b/sioa/NetBeansProjects/JeuDeRole2/src/jeuderole/JeuDeRole.java new file mode 100644 index 0000000..6a805a0 --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRole2/src/jeuderole/JeuDeRole.java @@ -0,0 +1,90 @@ +/* + * 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 jeuderole; + +import java.util.ArrayList; +import metier.Guerrier; +import metier.Jeu; +import metier.Personnage; +import metier.Sorcier; +import metier.Voleur; + +/** + * + * @author Dominique_2 + */ +public class JeuDeRole { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + /* System.out.println("1. Création de 2 guerrier identiques : "); + Guerrier leGuerrier1 = new Guerrier("Invincible", "Guerrier05.JPG", 30, 10, "Epée"); + Guerrier leGuerrier2 = new Guerrier("Invincible", "Guerrier05.JPG", 30, 10, "Epée"); + System.out.println("\tleGuerrier1 : " + leGuerrier1); + System.out.println("\tleGuerrier2 : " + leGuerrier2); + + System.out.println("\n2. Comparaison des 2 guerriers : "); + if (leGuerrier1.equals(leGuerrier2)) { + System.out.println("\tLes 2 guerriers sont identiques"); + } else { + System.out.println("\tLes 2 guerriers sont différents"); + } + + System.out.println("\n3. Création d'un 3ème guerrier : et comparaison guerrier1 et guerrier3"); + Guerrier leGuerrier3 = new Guerrier("Spartacus", "Guerrier05.JPG", 30, 10, "Epée"); + System.out.println("\tleGuerrier3 : " + leGuerrier3); + + if (leGuerrier1.equals(leGuerrier3)) { + System.out.println("\tLes 2 guerriers sont identiques"); + } else { + System.out.println("\tLes 2 guerriers sont différents"); + } + + System.out.println("\n4. Création d'un Sorcier et d'un Voleur : "); + Sorcier laSorciere = new Sorcier("ReineSorciere", "Sorciere1.jpg", 20, 30, "Pomme","enigme"); + Voleur leVoleur1 = new Voleur("Arsène Lupin", "Barbare04.jpg", 15, 25, "Pince"); + System.out.println("\tlaSorciere : " + laSorciere); + System.out.println("\tleVoleur1 : " + leVoleur1); + + System.out.println("\n5. Rencontre entre le sorcier et le guerrier2 : "); + //System.out.println(laSorciere.rencontrer(leGuerrier2)); + + System.out.println("\n6. Salutation entre la sorciere et le guerrier2 : "); + laSorciere.saluer(leGuerrier2); + + System.out.println("\n7. Salutation entre le guerrier2 et le voleur1 : "); + leGuerrier2.saluer(leVoleur1); + + System.out.println("\n8. Salutation entre le voleur1 et la sorciere : "); + leVoleur1.saluer(laSorciere); + + // Création d'une collection de Personnage + ArrayList lesPersonnages = new ArrayList<>(); + Personnage g1 = new Guerrier("Barbare","", 6, 4, "Hache"); + lesPersonnages.add(g1); + Personnage v1 = new Voleur("Raptout", "", 2, 4 , "Marteau"); + lesPersonnages.add(v1); + Sorcier s1 = new Sorcier("Panoramix","", 10, 5, "De laurier","Enigme"); + lesPersonnages.add(s1); + System.out.println("\n9. Collection de personnages créée :\n "+lesPersonnages); + + System.out.println("\n10. Rencontre entre le guerrier2 et la sorcière : "); + leGuerrier2.rencontrer(laSorciere); + + System.out.println("\n11. Rencontre entre un voleur et la sorcière : "); + leVoleur1.rencontrer(laSorciere); + */ + Jeu unJeu=new Jeu("Rencontre fatale"); + unJeu.getLesPersonnages().get(5).rencontrer(unJeu.getLesPersonnages().get(6)); + + + unJeu.getLesPersonnages().get(6).setEnergie(0); + unJeu.getLesPersonnages().get(5).combattre(unJeu.getLesPersonnages().get(6)); + + } +} diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/metier/Affrontement.form b/sioa/NetBeansProjects/JeuDeRole2/src/metier/Affrontement.form new file mode 100644 index 0000000..8d08dbe --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRole2/src/metier/Affrontement.form @@ -0,0 +1,317 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/metier/Affrontement.java b/sioa/NetBeansProjects/JeuDeRole2/src/metier/Affrontement.java new file mode 100644 index 0000000..91f0b61 --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRole2/src/metier/Affrontement.java @@ -0,0 +1,254 @@ +/* + * 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; + +/** + * + * @author clement.bouillot + */ +public class Affrontement extends javax.swing.JPanel { + + /** + * Creates new form Affrontement + */ + public Affrontement() { + initComponents(); + + } + + /** + * 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") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jPanel1 = new javax.swing.JPanel(); + image1 = new javax.swing.JLabel(); + jScrollPane1 = new javax.swing.JScrollPane(); + descriptionAffrontement = new javax.swing.JTextArea(); + jPanel2 = new javax.swing.JPanel(); + image2 = new javax.swing.JLabel(); + jPanel3 = new javax.swing.JPanel(); + choixAttaquant = new javax.swing.JComboBox<>(); + choixAttaqué = new javax.swing.JComboBox<>(); + jPanel4 = new javax.swing.JPanel(); + descriprionAttaquant = new javax.swing.JTextField(); + imageAttaquant = new javax.swing.JLabel(); + jPanel5 = new javax.swing.JPanel(); + descriptionAttaqué = new javax.swing.JTextField(); + imageAttaqué = new javax.swing.JLabel(); + okBT = new javax.swing.JToggleButton(); + + jPanel1.setBackground(new java.awt.Color(51, 51, 51)); + + image1.setForeground(new java.awt.Color(238, 238, 238)); + image1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/adj_1.jpg"))); // NOI18N + + descriptionAffrontement.setBackground(new java.awt.Color(51, 51, 51)); + descriptionAffrontement.setColumns(20); + descriptionAffrontement.setForeground(new java.awt.Color(238, 238, 238)); + descriptionAffrontement.setRows(5); + descriptionAffrontement.setText("Texte"); + jScrollPane1.setViewportView(descriptionAffrontement); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 237, Short.MAX_VALUE) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addComponent(image1, javax.swing.GroupLayout.PREFERRED_SIZE, 209, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(10, 10, 10))) + .addContainerGap()) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(18, 18, 18) + .addComponent(image1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) + .addGap(18, 18, 18) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 368, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + ); + + image2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/famille_1.jpg"))); // NOI18N + + choixAttaquant.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); + choixAttaquant.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + choixAttaquantActionPerformed(evt); + } + }); + + choixAttaqué.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); + + descriprionAttaquant.setText("jTextField1"); + + imageAttaquant.setText("jLabel1"); + + javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); + jPanel4.setLayout(jPanel4Layout); + jPanel4Layout.setHorizontalGroup( + jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel4Layout.createSequentialGroup() + .addComponent(descriprionAttaquant, javax.swing.GroupLayout.PREFERRED_SIZE, 201, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE)) + .addGroup(jPanel4Layout.createSequentialGroup() + .addGap(62, 62, 62) + .addComponent(imageAttaquant) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + jPanel4Layout.setVerticalGroup( + jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel4Layout.createSequentialGroup() + .addComponent(descriprionAttaquant, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(32, 32, 32) + .addComponent(imageAttaquant) + .addContainerGap(45, Short.MAX_VALUE)) + ); + + descriptionAttaqué.setText("jTextField2"); + + imageAttaqué.setText("jLabel2"); + + javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5); + jPanel5.setLayout(jPanel5Layout); + jPanel5Layout.setHorizontalGroup( + jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel5Layout.createSequentialGroup() + .addGap(61, 61, 61) + .addComponent(imageAttaqué) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addComponent(descriptionAttaqué, javax.swing.GroupLayout.PREFERRED_SIZE, 201, javax.swing.GroupLayout.PREFERRED_SIZE)) + ); + jPanel5Layout.setVerticalGroup( + jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel5Layout.createSequentialGroup() + .addComponent(descriptionAttaqué, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(32, 32, 32) + .addComponent(imageAttaqué) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); + jPanel3.setLayout(jPanel3Layout); + jPanel3Layout.setHorizontalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(choixAttaquant, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 43, Short.MAX_VALUE) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(choixAttaqué, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap()) + ); + jPanel3Layout.setVerticalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(choixAttaquant, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(choixAttaqué, 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) + .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + ); + + javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); + jPanel2.setLayout(jPanel2Layout); + jPanel2Layout.setHorizontalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap()) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGap(149, 149, 149) + .addComponent(image2) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + jPanel2Layout.setVerticalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGap(6, 6, 6) + .addComponent(image2, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(6, 6, 6)) + ); + + okBT.setText("Ok"); + okBT.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + okBTActionPerformed(evt); + } + }); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); + this.setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(layout.createSequentialGroup() + .addGap(220, 220, 220) + .addComponent(okBT))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addComponent(okBT, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + ); + }// //GEN-END:initComponents + + private void okBTActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okBTActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_okBTActionPerformed + + private void choixAttaquantActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_choixAttaquantActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_choixAttaquantActionPerformed + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JComboBox choixAttaquant; + private javax.swing.JComboBox choixAttaqué; + private javax.swing.JTextField descriprionAttaquant; + private javax.swing.JTextArea descriptionAffrontement; + private javax.swing.JTextField descriptionAttaqué; + private javax.swing.JLabel image1; + private javax.swing.JLabel image2; + private javax.swing.JLabel imageAttaquant; + private javax.swing.JLabel imageAttaqué; + private javax.swing.JPanel jPanel1; + private javax.swing.JPanel jPanel2; + private javax.swing.JPanel jPanel3; + private javax.swing.JPanel jPanel4; + private javax.swing.JPanel jPanel5; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JToggleButton okBT; + // End of variables declaration//GEN-END:variables +} diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/metier/Enigme.java b/sioa/NetBeansProjects/JeuDeRole2/src/metier/Enigme.java new file mode 100644 index 0000000..a85390e --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRole2/src/metier/Enigme.java @@ -0,0 +1,51 @@ +package metier; +import java.io.Serializable; + +/** + * + * @author Dominique_2 + */ +public class Enigme implements Serializable{ + private String question; + private String reponse; + + /** + * @return the question + */ + public String getQuestion() { + return question; + } + + /** + * @param question the question to set + */ + public void setQuestion(String question) { + this.question = question; + } + + /** + * @return the reponse + */ + public String getReponse() { + return reponse; + } + + /** + * @param reponse the reponse to set + */ + public void setReponse(String reponse) { + this.reponse = reponse; + } + + public Enigme(String question, String reponse) { + this.question = question; + this.reponse = reponse; + } + + @Override + public String toString() { + return "Enigme {" + "question=" + question + ", reponse=" + reponse + '}'; + } + +} + diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/metier/Guerrier.java b/sioa/NetBeansProjects/JeuDeRole2/src/metier/Guerrier.java new file mode 100644 index 0000000..63b15f4 --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRole2/src/metier/Guerrier.java @@ -0,0 +1,146 @@ +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 20210311 + */ +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() + "\n\tGuerrier{" + "arme=" + arme + '}'; + } + + @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; + } + + /** + * Rencontre du guerrier avec un autre personnage (Combat de dés) + * @param p + */ + @Override + public void rencontrer(Personnage p) { + Icon iCombat; + Icon iDes = new javax.swing.ImageIcon(getClass().getResource("../img/des.jpg")); + int score1 = 0; + int score2 = 0; + int nbJeu = 0; + String message = "Es-tu prêt à me combattre " + p.getNom() + " ? " ; + String titre = this.getNom() + " rencontre " + p.getNom() + " : "; + while (score1 == score2) { + if (nbJeu > 0) { + message = "Égalité. Rejoue vite "; + } + JOptionPane.showMessageDialog( null, + message, + titre + "défi dés", + WARNING_MESSAGE, + iDes); + score1 = Jeu.genererNbAleatoire(1, 6); + score2 = Jeu.genererNbAleatoire(1, 6); + nbJeu++; + } + String resultat="Ton score : " + score2 + " - Le mien : " + score1; + int type; + if (score1 >= score2) { + resultat += "\n\nTu as perdu," + + "\nattention à toi " + p.getNom() + + ",\nta vie est en danger!"; + iCombat = new javax.swing.ImageIcon(getClass().getResource("/img/Combat.jpg")); + p.varierDureeVie(-1); + p.varierEnergie(-2); + } else { + resultat += "\n\nTu as gagné ce défi," + + "\nmais je me vengerai de toi,\n" + + p.getNom() +", prends garde à toi!"; + iCombat = new javax.swing.ImageIcon(getClass().getResource("/img/CombatPerdu.jpg")); + p.varierEnergie(+2); // +2 pour le gagnant attaqué + varierEnergie(-1); // -1 pour le perdant attaquant + } + JOptionPane.showMessageDialog( null, + resultat, + titre + "résultat", + WARNING_MESSAGE, + iCombat); + } + + /** + * Rencontre avec un autre personnage + * @param unPerso personnage à saluer + */ + @Override + public void saluer(Personnage unPerso) { + String titre = this.getNom() + " salue " + unPerso.getNom(); + String message = "Bonjour " + unPerso.getNom() + ", \nsauve-toi vite avant que je ne te frappe avec mon arme redoutable!"; + JOptionPane.showMessageDialog(null, message, titre, JOptionPane.INFORMATION_MESSAGE); + } + +} diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/metier/Jeu.java b/sioa/NetBeansProjects/JeuDeRole2/src/metier/Jeu.java new file mode 100644 index 0000000..97b3763 --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRole2/src/metier/Jeu.java @@ -0,0 +1,141 @@ +package metier; + +import java.util.ArrayList; +import java.util.Vector; + +/** + * + * @author Dominique_2 + */ +public class Jeu { + + private String nomJeu; + private ArrayList lesPersonnages; + + /** + * @return the nomJeu + */ + public String getNomJeu() { + return nomJeu; + } + + /** + * @return the lesPersonnages + */ + public ArrayList getLesPersonnages() { + return lesPersonnages; + } + + @Override + public String toString() { + return "Jeu{" + "lesPersonnages=" + lesPersonnages + '}'; + } + + /** + * Constructeur + * + * @param nomJeu + */ + public Jeu(String nomJeu) { + this.nomJeu = nomJeu; + this.lesPersonnages = new ArrayList<>(); + chargerLesPersonnages(); + } + + /** + * Création des personnages du jeu + */ + public void chargerLesPersonnages() { + Personnage g1 = new Guerrier("Dudule", "Guerrier05.JPG", 5, 6, "Epée"); + Personnage g2 = new Guerrier("Toto", "Guerrier10.JPG", 8, 7, "Epée"); + Personnage g3 = new Guerrier("Dur à cuire", "Guerrier08.JPG", 4, 5, "Poignard"); + Personnage g4 = new Guerrier("Prêt à tout", "Guerrier12.JPG", 6, 4, "Matraque"); + lesPersonnages.add(g1); + lesPersonnages.add(g2); + lesPersonnages.add(g3); + lesPersonnages.add(g4); + + Personnage clampin = new Personnage("Simone", "Simone.JPG", 4, 3); + lesPersonnages.add(clampin); + + Sorcier s1 = new Sorcier("Panoramix", "panoramix.gif", 10, 5, "Sortilèges"); + Enigme uneEnigme = new Enigme("Je suis vague en bord de mer.\n" + + "Je descends des montagnes en hiver.\n" + + "Sans moi vous n'aurez plus une larme.", + "L'eau"); + s1.ajouterEnigme(uneEnigme); + uneEnigme = new Enigme("Je serai hier, j'étais demain.", + "Aujourd'hui"); + s1.ajouterEnigme(uneEnigme); + uneEnigme = new Enigme("Si de ton doigt tu veux me toucher, apprête toi alors à le retirer.\n" + + "Mais si tu sais me manipuler ta demeure en sera réchauffée et illuminée.\n" + + "Qui suis-je ?", + "Le feu"); + s1.ajouterEnigme(uneEnigme); + uneEnigme = new Enigme("Je suis si fragile que lorsque l'on prononce mon nom, je meurs.", + "Le silence"); + s1.ajouterEnigme(uneEnigme); + lesPersonnages.add(s1); + s1 = new Sorcier("FaitPeur", "Sorcier02.JPG", 10, 4, "Sortilèges"); + s1.ajouterEnigme(uneEnigme); + uneEnigme = new Enigme("Connu pour ses galeries,\n" + + "Et le ton de son gris,\n" + + "Elle évoque la mauvaise vision,\n" + + "Et c'est un excellent espion", + "La taupe"); + s1.ajouterEnigme(uneEnigme); + uneEnigme = new Enigme("Symbole de maladresse, pour beaucoup je suis signe de malédiction.\n" + + "Quand on passe l'arme, c'est parfois à moi.\n" + + "Que suis-je ?", + "La gauche"); + s1.ajouterEnigme(uneEnigme); + uneEnigme = new Enigme("Vous ne pouvez que me deviner et ne pouvez qu'avancer vers moi.\n" + + "Quand vous arrivez, je ne suis plus là.\n" + + "Car à chaque pas avancé, je recule d'autant.\n" + + "Que suis-je ?", + "Le futur"); + s1.ajouterEnigme(uneEnigme); + lesPersonnages.add(s1); + + Personnage rapTout = new Voleur("Raptout", "Barbare04.jpg", 2, 4, "Tournevis"); + lesPersonnages.add(rapTout); + } + + /** + * Recherche du personnage dont le nom est passé en paramètre + * + * @param n nom du personnage recherché + * @return personnage correspondant au nom s'il existe, null sinon + */ + public Personnage rechercherPerso(String n) { + int i = 0; + Personnage p = null; + while (p == null && i < lesPersonnages.size()) { + if (lesPersonnages.get(i).getNom().equals(n)) { + p = lesPersonnages.get(i); + } else { + i++; + } + } + return p; + } + + /** + * Recherche d'un nombre aléatoire entre min et max inclus + * + * @param min + * @param max + * @return entier compris entre min et max + */ + public static int genererNbAleatoire(int min, int max) { + return min + (int) (Math.random() * ((max - min) + 1)); + } + + /* public Vector getPersonnagesVivants{ + + +} + */ + + +} diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/metier/Personnage.java b/sioa/NetBeansProjects/JeuDeRole2/src/metier/Personnage.java new file mode 100644 index 0000000..e983f47 --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRole2/src/metier/Personnage.java @@ -0,0 +1,195 @@ +package metier; +import java.util.Objects; +import javax.swing.Icon; +import javax.swing.JOptionPane; + +/** + * Classe Mère Personnage + * @author Dominique_2 + * @version 20210311 + */ +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; + } + /** + * Permet d'obtenir les valeurs des attributs de l'objet courant + * @return liste des attributs avec leurs valeurs + */ + @Override + public String toString() { + return "Personnage{" + "nom=" + nom + ", img=" + img + ", energie=" + energie + ", dureeVie=" + dureeVie + '}'; + } + + @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; + } + if (!Objects.equals(this.img, other.img)) { + return false; + } + return true; + } + + /** + * 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; + } + + /** + * Rencontre avec un autre personnage + * @param unPerso : personnage rencontré + * @return + */ + public void rencontrer(Personnage unPerso) { + String titre = this.getNom() + " rencontre " + unPerso.getNom(); + String message = "Bonjour " + unPerso.getNom() + " !"; + JOptionPane.showMessageDialog(null, message, titre, JOptionPane.INFORMATION_MESSAGE); + String source = "/img/" + this.getImg(); + Icon imgPerso = new javax.swing.ImageIcon(getClass().getResource(source)); + JOptionPane.showMessageDialog(null, message, titre, JOptionPane.INFORMATION_MESSAGE, imgPerso); + } + + /** + * Rencontre avec un autre personnage + * @param unPerso personnage à saluer + */ + public void saluer(Personnage unPerso) { + String titre = this.getNom() + " salue " + unPerso.getNom(); + String message = "Bonjour " + unPerso.getNom() + ", \nje suis content de te revoir!"; + JOptionPane.showMessageDialog(null, message, titre, JOptionPane.INFORMATION_MESSAGE); + } + + /** + * Ajout du nombre passé en paramètre à l'énergie + * Si le résultat de l'ajout est négatif, il est forcé à 0 + * @param nb ; nombre à ajouter (positif ou négatif) + */ + public void varierEnergie(int nb){ + energie = energie+nb > 0 ? energie+nb : 0; + } + + /** + * Ajout du nombre passé en paramètre à la durée de vie + * Si le résultat de l'ajout est négatif, il est forcé à 0 + * @param nb ; nombre à ajouter (positif ou négatif) + */ + public void varierDureeVie(int nb){ + dureeVie = dureeVie+nb > 0 ? dureeVie+nb : 0; + } + + public void combattre(Personnage unPerso) { + if(unPerso.getEnergie()==0){ + String titre = this.getNom() + " veut combattre " + unPerso.getNom(); + String message = "Aide moi..."+ getNom() +" Je n'ai plus d'énérgie" ; + JOptionPane.showMessageDialog(null, message, titre, JOptionPane.INFORMATION_MESSAGE); + } + } +} diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/metier/Sorcier.java b/sioa/NetBeansProjects/JeuDeRole2/src/metier/Sorcier.java new file mode 100644 index 0000000..f02210e --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRole2/src/metier/Sorcier.java @@ -0,0 +1,163 @@ +package metier; + +import java.util.ArrayList; +import java.util.Objects; +import javax.swing.Icon; +import javax.swing.JOptionPane; +import static javax.swing.JOptionPane.QUESTION_MESSAGE; + +/** + * Classe Sorier, hérite de la classe Personnage + * @author Dominique_2 + * @version 20210318 + */ +public class Sorcier extends Personnage { + + private String baguette; + private ArrayList lesEnigmes; + + /** + * Valorisation des variables membres + * @param nom nom du sorcier + * @param img nom de l'image représentant le sorcier + * @param energie valeur énergétique du sorcier + * @param dureeVie durée de vie du sorcier + * @param baguette baguette du sorcier + * @param e inutile désormais + */ + public Sorcier(String nom, String img, int energie, int dureeVie, String baguette, String e) { + super(nom, img, energie, dureeVie); + this.lesEnigmes = new ArrayList<>(); + this.baguette = baguette; + } + + /** + * Valorisation des variables membres + * @param nom nom du sorcier + * @param img nom de l'image représentant le sorcier + * @param energie valeur énergétique du sorcier + * @param dureeVie durée de vie du sorcier + * @param baguette baguette du sorcier + */ + public Sorcier(String nom, String img, int energie, int dureeVie, String baguette) { + super(nom, img, energie, dureeVie); + this.lesEnigmes = new ArrayList<>(); + this.baguette = baguette; + } + + @Override + public int hashCode() { + int hash = 7; + hash = super.hashCode() + (73 * hash + Objects.hashCode(this.baguette)); + 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 Sorcier other = (Sorcier) obj; + if (!Objects.equals(this.baguette, other.baguette)) { + return false; + } + if (!Objects.equals(this.lesEnigmes, other.lesEnigmes)) { + return false; + } + if (!super.equals(obj)) { + return false; + } + return true; + } + + /** + * 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() + "\n\tSorcier{" + "baguette=" + baguette + ", nb enigmes = " + getLesEnigmes().size() +'}'; + } + + /** + * Get the value of baguette * + * @return the value of baguette + */ + public String getBaguette() { + return baguette; + } + + /** + * Set the value of baguette * + * @param baguette new value of baguette + */ + public void setBaguette(String baguette) { + this.baguette = baguette; + } + + public ArrayList getEnigme() { + return getLesEnigmes(); + } + + /** + * Rencontre avec un autre personnage + * @param unPerso personnage à saluer + */ + public void saluer(Personnage unPerso) { + String titre = this.getNom() + " salue " + unPerso.getNom(); + String message = "Bonjour " + unPerso.getNom() + ", \nje t'ai jeté un sort, tu es désormais sous ma dépendance!"; + JOptionPane.showMessageDialog(null, message, titre, JOptionPane.INFORMATION_MESSAGE); + } + + /** + * Ajout de l'énigme passée en paramètre dans la collection les Enigmes + * @param e Enigme + */ + public void ajouterEnigme(Enigme e) { + getLesEnigmes().add(e); + } + + public void rencontrer(Personnage p) { + int indiceEnigme = Jeu.genererNbAleatoire(0, getLesEnigmes().size()-1); + String titre = this.getNom() + " rencontre " + p.getNom(); + String reponse = JOptionPane.showInputDialog( + null, + getLesEnigmes().get(indiceEnigme).getQuestion(), + titre + " : énigme", + QUESTION_MESSAGE); + String resultat=""; + int type; + if (getLesEnigmes().get(indiceEnigme).getReponse().equals(reponse)) { + resultat = "Bonne réponse, tu peux passer ton chemin!"; + type = JOptionPane.INFORMATION_MESSAGE; + p.varierDureeVie(1); + } else { + resultat = "Mauvaise réponse, " + + "\nattention à toi " + p.getNom() +", " + + "\nta vie est en danger!"; + type = JOptionPane.WARNING_MESSAGE; + p.varierDureeVie(-2); + } + varierEnergie(-1); + Icon iMagie = new javax.swing.ImageIcon(getClass().getResource("/img/magie.jpg")); + JOptionPane.showMessageDialog(null, resultat, titre + " : résultat",type, iMagie); + } + + /** + * @return the lesEnigmes + */ + public ArrayList getLesEnigmes() { + return lesEnigmes; + } +} diff --git a/sioa/NetBeansProjects/JeuDeRole2/src/metier/Voleur.java b/sioa/NetBeansProjects/JeuDeRole2/src/metier/Voleur.java new file mode 100644 index 0000000..e3329dd --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRole2/src/metier/Voleur.java @@ -0,0 +1,153 @@ +package metier; + +import java.util.Objects; +import javax.swing.Icon; +import javax.swing.JOptionPane; +import static javax.swing.JOptionPane.DEFAULT_OPTION; +import static javax.swing.JOptionPane.QUESTION_MESSAGE; + +/** + * + * @author Dominique_2 + */ +public class Voleur extends Personnage{ + + private String outil; + String [] outils = {"Pierre", "Feuille", "Ciseaux"}; + + /** + * 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 outil outil du guerrier + */ + public Voleur(String nom, String img, int energie, int dureeVie, String outil) { + super(nom, img, energie, dureeVie); + this.outil = outil; + } + + @Override + public int hashCode() { + int hash = 7; + hash = super.hashCode() + (29 * hash + Objects.hashCode(this.outil)); + 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 Voleur other = (Voleur) obj; + if (!Objects.equals(this.outil, other.outil)) { + return false; + } + if (!super.equals(obj)) { + return false; + } + return true; + } + + /** + * 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() + "\n\tVoleur{" + "outil=" + outil + '}'; + } + + /** + * 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 void rencontrer(Personnage p) { +// int indiceOutil = Jeu.genererNbAleatoire(0, outils.length -1); + Icon iPFC = new javax.swing.ImageIcon(getClass().getResource("/img/pierreFeuilleCiseaux.jpg")); +// String reponse = (String) JOptionPane.showInputDialog( +// null, +// "Pierre, feuille, ciseaux ? ", +// "Quel est ton choix ?" + p.getNom(), +// QUESTION_MESSAGE, iPFC, +// outils,""); + int nbJeu = 0; + String mess = "Que choisis-tu \n" + p.getNom() + " ?"; + String titre = this.getNom() + " rencontre " + p.getNom(); + int rep=-1, indiceOutil=-1; + while (rep == indiceOutil) { + if (nbJeu > 0) { + mess = "Égalité, rejoue vite!"; + } + indiceOutil = Jeu.genererNbAleatoire(0, outils.length -1); + rep = JOptionPane.showOptionDialog( + null, + mess, + titre, + DEFAULT_OPTION, + QUESTION_MESSAGE, + iPFC, + outils, + 0); + nbJeu++; + } + boolean gagne = true; // Position du personnage rencontré + String explication = ""; + switch (indiceOutil) { + case 0 : // Cas Pierre + if (rep == 2) { // Cas Ciseaux + gagne = false; // La pierre aiguise les ciseaux + explication = "La pierre aiguise les ciseaux"; + } + break; + case 1 : // Cas Feuille + if (rep == 0) { // Cas Pierre + gagne = false; // La feuille bat la pierre en l'enveloppant + explication = "La feuille enveloppe la pierre"; } + break; + case 2 : // Cas Ciseaux + if (rep == 1) { // Cas Feuille + gagne = false; // Les ciseaux coupent la feuille + explication = "Les ciseaux coupent la feuille"; + } + } + mess = "J'ai choisi " + outils[indiceOutil] + " et toi " + outils[rep] + "\n" + explication + "\n\n"; + mess += gagne ? + "Aujourd'hui tu as gagné "+p.getNom()+",\n mais qu'en sera-t-il demain ?" : + "Ah, ah, ah ! Perdu pour toi "+p.getNom()+".\nAu plaisir de te revoir..."; + JOptionPane.showMessageDialog(null, mess, titre + " : résultat",0, iPFC); + + if (!gagne) { + p.varierDureeVie(-1); + p.varierEnergie(-1); + } else { + p.varierEnergie(1); + varierEnergie(-1); + } + } + +} diff --git a/sioa/NetBeansProjects/JeuDeRoleBTS/build.xml b/sioa/NetBeansProjects/JeuDeRoleBTS/build.xml new file mode 100644 index 0000000..a435579 --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRoleBTS/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project JeuDeRoleBTS. + + + diff --git a/sioa/NetBeansProjects/JeuDeRoleBTS/manifest.mf b/sioa/NetBeansProjects/JeuDeRoleBTS/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRoleBTS/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/sioa/NetBeansProjects/JeuDeRoleBTS/nbproject/build-impl.xml b/sioa/NetBeansProjects/JeuDeRoleBTS/nbproject/build-impl.xml new file mode 100644 index 0000000..c27e786 --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRoleBTS/nbproject/build-impl.xml @@ -0,0 +1,1770 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sioa/NetBeansProjects/JeuDeRoleBTS/nbproject/genfiles.properties b/sioa/NetBeansProjects/JeuDeRoleBTS/nbproject/genfiles.properties new file mode 100644 index 0000000..906070a --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRoleBTS/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=1b075167 +build.xml.script.CRC32=0f9ae6ee +build.xml.stylesheet.CRC32=f85dc8f2@1.95.0.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=1b075167 +nbproject/build-impl.xml.script.CRC32=270e6e47 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.95.0.48 diff --git a/sioa/NetBeansProjects/JeuDeRoleBTS/nbproject/private/private.properties b/sioa/NetBeansProjects/JeuDeRoleBTS/nbproject/private/private.properties new file mode 100644 index 0000000..90c7814 --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRoleBTS/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=/home/clement.bouillot/.netbeans/12.0/build.properties diff --git a/sioa/NetBeansProjects/JeuDeRoleBTS/nbproject/project.properties b/sioa/NetBeansProjects/JeuDeRoleBTS/nbproject/project.properties new file mode 100644 index 0000000..38b31f3 --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRoleBTS/nbproject/project.properties @@ -0,0 +1,95 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.modulepath=\ + ${run.modulepath} +debug.test.classpath=\ + ${run.test.classpath} +debug.test.modulepath=\ + ${run.test.modulepath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/JeuDeRoleBTS.jar +dist.javadoc.dir=${dist.dir}/javadoc +dist.jlink.dir=${dist.dir}/jlink +dist.jlink.output=${dist.jlink.dir}/JeuDeRoleBTS +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.modulepath= +javac.processormodulepath= +javac.processorpath=\ + ${javac.classpath} +javac.source=11 +javac.target=11 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.modulepath=\ + ${javac.modulepath} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.html5=false +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +# The jlink additional root modules to resolve +jlink.additionalmodules= +# The jlink additional command line parameters +jlink.additionalparam= +jlink.launcher=true +jlink.launcher.name=JeuDeRoleBTS +main.class=jeuderolebts.JeuDeRoleBTS +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# 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. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.modulepath=\ + ${javac.modulepath} +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +run.test.modulepath=\ + ${javac.test.modulepath} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/sioa/NetBeansProjects/JeuDeRoleBTS/nbproject/project.xml b/sioa/NetBeansProjects/JeuDeRoleBTS/nbproject/project.xml new file mode 100644 index 0000000..0656fa7 --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRoleBTS/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + JeuDeRoleBTS + + + + + + + + + diff --git a/sioa/NetBeansProjects/JeuDeRoleBTS/src/jeuderolebts/JeuDeRoleBTS.java b/sioa/NetBeansProjects/JeuDeRoleBTS/src/jeuderolebts/JeuDeRoleBTS.java new file mode 100644 index 0000000..e202666 --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRoleBTS/src/jeuderolebts/JeuDeRoleBTS.java @@ -0,0 +1,19 @@ +/* + * 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 jeuderolebts; + +import métier.Perso; +import métier.Sorcier; + +/** + * + * @author clement.bouillot + */ +public class JeuDeRoleBTS { + + + +} diff --git a/sioa/NetBeansProjects/JeuDeRoleBTS/src/métier/Perso.java b/sioa/NetBeansProjects/JeuDeRoleBTS/src/métier/Perso.java new file mode 100644 index 0000000..3a088a2 --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRoleBTS/src/métier/Perso.java @@ -0,0 +1,163 @@ +/* + * 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 métier; + +import java.util.Objects; +import javax.swing.Icon; +import javax.swing.JOptionPane; + +/** + * + * @author clement.bouillot + */ +public class Perso { + + // Variables membres + private String nom; + private int energie; + private int dureeVie; + /** + * Valorisation des variables membres + * @param nom nom du personnage + * @param energie valeur énergétique + * @param dureeVie durée de vie, en année + */ + public Perso(String nom, int energie, int dureeVie) { + this.nom = nom; + this.energie = energie; + this.dureeVie = dureeVie; + } + /** + * Permet d'obtenir les valeurs des attributs de l'objet courant + * @return liste des attributs avec leurs valeurs + */ + @Override + public String toString() { + return "Personnage{" + "nom=" + nom + ", energie=" + energie + ", dureeVie=" + dureeVie + '}'; + } + + @Override + public int hashCode() { + int hash = 3; + hash = 47 * hash + Objects.hashCode(this.nom); + 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 Perso other = (Perso) 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 true; + } + + /** + * 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 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; + } + + + /** + * Ajout du nombre passé en paramètre à l'énergie + * Si le résultat de l'ajout est négatif, il est forcé à 0 + * @param nb ; nombre à ajouter (positif ou négatif) + */ + public void varierEnergie(int nb){ + energie = energie+nb > 0 ? energie+nb : 0; + } + /** + * Ajout de la fonction combat + * + * @param unPerso + */ + public void combattre(Perso unPerso) { + if(unPerso.getEnergie()==0){ + String titre = this.getNom() + " veut combattre " + unPerso.getNom(); + String message = "Aide moi..."+ getNom() +" Je n'ai plus d'énérgie" ; + JOptionPane.showMessageDialog(null, message, titre, JOptionPane.INFORMATION_MESSAGE); + } + } + + + /** + * Ajout du nombre passé en paramètre à la durée de vie + * Si le résultat de l'ajout est négatif, il est forcé à 0 + * @param nb ; nombre à ajouter (positif ou négatif) + */ + public void varierDureeVie(int nb){ + dureeVie = dureeVie+nb > 0 ? dureeVie+nb : 0; + } + +} + diff --git a/sioa/NetBeansProjects/JeuDeRoleBTS/src/métier/Sorcier.java b/sioa/NetBeansProjects/JeuDeRoleBTS/src/métier/Sorcier.java new file mode 100644 index 0000000..79a13b3 --- /dev/null +++ b/sioa/NetBeansProjects/JeuDeRoleBTS/src/métier/Sorcier.java @@ -0,0 +1,23 @@ +/* + * 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 métier; + +import métier.Perso +/** + * + * @author clement.bouillot + */ +public class Sorcier { + +/*Utilisationde jocker en cas de Durée de vie à 0 +* +* +* +*/ + + + +} diff --git a/sioa/NetBeansProjects/LaPoste/build.xml b/sioa/NetBeansProjects/LaPoste/build.xml new file mode 100644 index 0000000..a8653da --- /dev/null +++ b/sioa/NetBeansProjects/LaPoste/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project LaPoste. + + + diff --git a/sioa/NetBeansProjects/LaPoste/manifest.mf b/sioa/NetBeansProjects/LaPoste/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/sioa/NetBeansProjects/LaPoste/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/sioa/NetBeansProjects/LaPoste/nbproject/build-impl.xml b/sioa/NetBeansProjects/LaPoste/nbproject/build-impl.xml new file mode 100644 index 0000000..506a2f7 --- /dev/null +++ b/sioa/NetBeansProjects/LaPoste/nbproject/build-impl.xml @@ -0,0 +1,1770 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sioa/NetBeansProjects/LaPoste/nbproject/genfiles.properties b/sioa/NetBeansProjects/LaPoste/nbproject/genfiles.properties new file mode 100644 index 0000000..5b2483e --- /dev/null +++ b/sioa/NetBeansProjects/LaPoste/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=d4c4e7e0 +build.xml.script.CRC32=370f3539 +build.xml.stylesheet.CRC32=f85dc8f2@1.95.0.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=d4c4e7e0 +nbproject/build-impl.xml.script.CRC32=7d9297c2 +nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.95.0.48 diff --git a/sioa/NetBeansProjects/LaPoste/nbproject/private/private.properties b/sioa/NetBeansProjects/LaPoste/nbproject/private/private.properties new file mode 100644 index 0000000..90c7814 --- /dev/null +++ b/sioa/NetBeansProjects/LaPoste/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=/home/clement.bouillot/.netbeans/12.0/build.properties diff --git a/sioa/NetBeansProjects/LaPoste/nbproject/private/private.xml b/sioa/NetBeansProjects/LaPoste/nbproject/private/private.xml new file mode 100644 index 0000000..59c530b --- /dev/null +++ b/sioa/NetBeansProjects/LaPoste/nbproject/private/private.xml @@ -0,0 +1,14 @@ + + + + + + file:/home/clement.bouillot/NetBeansProjects/LaPoste/src/BureauPoste/Colis.java + file:/home/clement.bouillot/NetBeansProjects/LaPoste/src/BureauPoste/Poste.java + file:/home/clement.bouillot/NetBeansProjects/LaPoste/src/BureauPoste/Publicite.java + file:/home/clement.bouillot/NetBeansProjects/LaPoste/src/BureauPoste/Courrier.java + file:/home/clement.bouillot/NetBeansProjects/LaPoste/src/BureauPoste/Lettre.java + file:/home/clement.bouillot/NetBeansProjects/LaPoste/src/BureauPoste/BoitePostale.java + + + diff --git a/sioa/NetBeansProjects/LaPoste/nbproject/project.properties b/sioa/NetBeansProjects/LaPoste/nbproject/project.properties new file mode 100644 index 0000000..c64bb90 --- /dev/null +++ b/sioa/NetBeansProjects/LaPoste/nbproject/project.properties @@ -0,0 +1,95 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.modulepath=\ + ${run.modulepath} +debug.test.classpath=\ + ${run.test.classpath} +debug.test.modulepath=\ + ${run.test.modulepath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/LaPoste.jar +dist.javadoc.dir=${dist.dir}/javadoc +dist.jlink.dir=${dist.dir}/jlink +dist.jlink.output=${dist.jlink.dir}/LaPoste +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.modulepath= +javac.processormodulepath= +javac.processorpath=\ + ${javac.classpath} +javac.source=11 +javac.target=11 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.modulepath=\ + ${javac.modulepath} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.html5=false +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +# The jlink additional root modules to resolve +jlink.additionalmodules= +# The jlink additional command line parameters +jlink.additionalparam= +jlink.launcher=true +jlink.launcher.name=LaPoste +main.class=laposte.LaPoste +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# 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. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.modulepath=\ + ${javac.modulepath} +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +run.test.modulepath=\ + ${javac.test.modulepath} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/sioa/NetBeansProjects/LaPoste/nbproject/project.xml b/sioa/NetBeansProjects/LaPoste/nbproject/project.xml new file mode 100644 index 0000000..4f7adc8 --- /dev/null +++ b/sioa/NetBeansProjects/LaPoste/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + LaPoste + + + + + + + + + diff --git a/sioa/NetBeansProjects/LaPoste/src/BureauPoste/BoitePostale.java b/sioa/NetBeansProjects/LaPoste/src/BureauPoste/BoitePostale.java new file mode 100644 index 0000000..506dd41 --- /dev/null +++ b/sioa/NetBeansProjects/LaPoste/src/BureauPoste/BoitePostale.java @@ -0,0 +1,14 @@ +/* + * 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 BureauPoste; + +/** + * + * @author clement.bouillot + */ +public class BoitePostale { + +} diff --git a/sioa/NetBeansProjects/LaPoste/src/BureauPoste/Colis.java b/sioa/NetBeansProjects/LaPoste/src/BureauPoste/Colis.java new file mode 100644 index 0000000..bf20341 --- /dev/null +++ b/sioa/NetBeansProjects/LaPoste/src/BureauPoste/Colis.java @@ -0,0 +1,34 @@ +/* + * 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 BureauPoste; + +/** + * + * @author clement.bouillot + */ +public class Colis extends Courrier{ + String volume; + + public Colis(String volume, int poids, String modeExpe, String adresse) { + super(poids, modeExpe, adresse); + this.volume = volume; + } + + public String getVolume() { + return volume; + } + + public void setVolume(String volume) { + this.volume = volume; + } + + @Override + public String toString() { + return "Colis{" + "volume=" + volume + '}'; + } + + +} diff --git a/sioa/NetBeansProjects/LaPoste/src/BureauPoste/Courrier.java b/sioa/NetBeansProjects/LaPoste/src/BureauPoste/Courrier.java new file mode 100644 index 0000000..1312b7a --- /dev/null +++ b/sioa/NetBeansProjects/LaPoste/src/BureauPoste/Courrier.java @@ -0,0 +1,52 @@ +/* + * 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 BureauPoste; + +/** + * + * @author clement.bouillot + */ +public class Courrier{ + int poids; + String modeExpe; + String adresse; + + public Courrier(int poids, String modeExpe, String adresse) { + this.poids = poids; + this.modeExpe = modeExpe; + this.adresse = adresse; + } + + @Override + public String toString() { + return "Courrier{" + "poids=" + poids + ", modeExpe=" + modeExpe + ", adresse=" + adresse + '}'; + } + + public int getPoids() { + return poids; + } + + public void setPoids(int poids) { + this.poids = poids; + } + + public String getModeExpe() { + return modeExpe; + } + + public void setModeExpe(String modeExpe) { + this.modeExpe = modeExpe; + } + + public String getAdresse() { + return adresse; + } + + public void setAdresse(String adresse) { + this.adresse = adresse; + } + +} diff --git a/sioa/NetBeansProjects/LaPoste/src/BureauPoste/Lettre.java b/sioa/NetBeansProjects/LaPoste/src/BureauPoste/Lettre.java new file mode 100644 index 0000000..92d04b3 --- /dev/null +++ b/sioa/NetBeansProjects/LaPoste/src/BureauPoste/Lettre.java @@ -0,0 +1,32 @@ +/* + * 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 BureauPoste; + +/** + * + * @author clement.bouillot + */ +public class Lettre extends Courrier{ + String format; + + public Lettre(String format, int poids, String modeExpe, String adresse) { + super(poids, modeExpe, adresse); + this.format = format; + } + + public String getFormat() { + return format; + } + + public void setFormat(String format) { + this.format = format; + } + + @Override + public String toString() { + return "Lettre{" + "format=" + format + '}'; + } +} diff --git a/sioa/NetBeansProjects/LaPoste/src/BureauPoste/Poste.java b/sioa/NetBeansProjects/LaPoste/src/BureauPoste/Poste.java new file mode 100644 index 0000000..322fcf5 --- /dev/null +++ b/sioa/NetBeansProjects/LaPoste/src/BureauPoste/Poste.java @@ -0,0 +1,38 @@ +package BureauPoste; + +// PROGRAMME PRINCIPAL (A NE PAS MODIFIER) +class Poste { + + public static void main(String args[]) { + //Création d'une boite-aux-lettres + // 30 est la capacit'e maximale de la + // boite aux lettres + + Boite boite = new Boite(30); + + //Creation de divers courriers/colis.. + Lettre lettre1 = new Lettre(200, true, "Chemin des Acacias 28, 1009 Pully", "A3"); + Lettre lettre2 = new Lettre(800, false, "", "A4"); // invalide + + Publicite pub1 = new Publicite(1500, true, "Les Moilles 13A, 1913 Saillon"); + Publicite pub2 = new Publicite(3000, false, ""); // invalide + + Colis colis1 = new Colis(5000, true, "Grand rue 18, 1950 Sion", 30); + Colis colis2 = new Colis(3000, true, "Chemin des fleurs 48, 2800 Delemont", 70); //Colis invalide ! + + boite.ajouterCourrier(lettre1); + boite.ajouterCourrier(lettre2); + boite.ajouterCourrier(pub1); + boite.ajouterCourrier(pub2); + boite.ajouterCourrier(colis1); + boite.ajouterCourrier(colis2); + + + System.out.println("Le montant total d'affranchissement est de " + + boite.affranchir()); + boite.afficher(); + + System.out.println("La boite contient " + boite.courriersInvalides() + + " courriers invalides"); + } +} diff --git a/sioa/NetBeansProjects/LaPoste/src/BureauPoste/Publicite.java b/sioa/NetBeansProjects/LaPoste/src/BureauPoste/Publicite.java new file mode 100644 index 0000000..438b091 --- /dev/null +++ b/sioa/NetBeansProjects/LaPoste/src/BureauPoste/Publicite.java @@ -0,0 +1,19 @@ +/* + * 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 BureauPoste; + +/** + * + * @author clement.bouillot + */ +public class Publicite extends Courrier{ + + public Publicite(int poids, String modeExpe, String adresse) { + super(poids, modeExpe, adresse); + } + + +} diff --git a/sioa/NetBeansProjects/Quizz/nbproject/private/private.properties b/sioa/NetBeansProjects/Quizz/nbproject/private/private.properties new file mode 100644 index 0000000..a39caf5 --- /dev/null +++ b/sioa/NetBeansProjects/Quizz/nbproject/private/private.properties @@ -0,0 +1,3 @@ +browser=SL[/Browsers/FirefoxBrowser +external.project.url= +server=INTERNAL diff --git a/sioa/NetBeansProjects/Quizz/nbproject/private/private.xml b/sioa/NetBeansProjects/Quizz/nbproject/private/private.xml new file mode 100644 index 0000000..faa3b74 --- /dev/null +++ b/sioa/NetBeansProjects/Quizz/nbproject/private/private.xml @@ -0,0 +1,10 @@ + + + + + + file:/home/clement.bouillot/NetBeansProjects/Quizz/public_html/Correction.html + file:/home/clement.bouillot/NetBeansProjects/Quizz/public_html/Questions%20Réponses.html + + + diff --git a/sioa/NetBeansProjects/Quizz/nbproject/project.properties b/sioa/NetBeansProjects/Quizz/nbproject/project.properties new file mode 100644 index 0000000..77d031b --- /dev/null +++ b/sioa/NetBeansProjects/Quizz/nbproject/project.properties @@ -0,0 +1,9 @@ +auxiliary.org-netbeans-modules-javascript-nodejs.run_2e_enabled=false +browser.run=true +file.reference.Quizz-public_html=public_html +file.reference.Quizz-test=test +files.encoding=UTF-8 +site.root.folder=${file.reference.Quizz-public_html} +start.file=Questions R\u00e9ponses.html +test.folder=${file.reference.Quizz-test} +web.context.root=/Quizz diff --git a/sioa/NetBeansProjects/Quizz/nbproject/project.xml b/sioa/NetBeansProjects/Quizz/nbproject/project.xml new file mode 100644 index 0000000..7257a7c --- /dev/null +++ b/sioa/NetBeansProjects/Quizz/nbproject/project.xml @@ -0,0 +1,9 @@ + + + org.netbeans.modules.web.clientproject + + + Quizz + + + diff --git a/sioa/NetBeansProjects/Quizz/package.json b/sioa/NetBeansProjects/Quizz/package.json new file mode 100644 index 0000000..3e8e4a3 --- /dev/null +++ b/sioa/NetBeansProjects/Quizz/package.json @@ -0,0 +1,8 @@ +{ + "name": "Quizz", + "version": "1.0.0", + "keywords": ["util", "functional", "server", "client", "browser"], + "author": "clement.bouillot", + "contributors": [], + "dependencies": {} +} diff --git a/sioa/NetBeansProjects/Quizz/public_html/Correction.html b/sioa/NetBeansProjects/Quizz/public_html/Correction.html new file mode 100644 index 0000000..82c50a9 --- /dev/null +++ b/sioa/NetBeansProjects/Quizz/public_html/Correction.html @@ -0,0 +1,89 @@ + + + + Correction Quizz Escalade + + + + +

CORRECTION QUIZZ ESCALADE

+ + + +
  • La dégaine permet d'installer la corde au fur et à mesure de l'ascenscien, en tête, du grimpeur. Elle sert donc uniquement à:

  • +
    + +

    ❌ Assurer

    +

    ✅ Grimper en tête

    +

    ❌ S'accrocher

    + +
    + +
  • Le noeud de huit justement réalisé est celui ci:

  • + +

    +❌ +❌

    + +
    + + +
  • Quels sont les 5 temps de l'assurage?

  • + +
    1. + ✅

      +

    2. + +
    3. + ❌

      +

    4. + +
    5. + ❌

      +

    6. + +
    7. +✅ +


    8. + +
    9. +✅

      +
    10. +
    + +
    + +
  • La corde pour grimper passe dans les deux pontets, donc:

  • + +
    + +

    ❌ A

    +

    ❌ B

    +

    ❌ C

    +

    ✅ AB

    + +
    + +
  • A l'inverse, on accroche le système d'assurage dans l'anneau central:

  • + +

    ❌ A

    +

    ❌ B

    +

    ✅ C

    +

    ❌ AB

    + +
    + +
  • Seul le grigri, dans les systèmes d'assurage ici présent, est un autobloquant. La bonne réponse est donc:

  • + +

    +✅ +❌ + + +

    + +

    Merci d'avoir participé 😁

    + +


    +
    come to see us
    + \ No newline at end of file diff --git a/sioa/NetBeansProjects/Quizz/public_html/Questions Réponses.html b/sioa/NetBeansProjects/Quizz/public_html/Questions Réponses.html new file mode 100644 index 0000000..c9fd14d --- /dev/null +++ b/sioa/NetBeansProjects/Quizz/public_html/Questions Réponses.html @@ -0,0 +1,88 @@ + + + + + Quizz Escalade + + + + + +

    QUIZZ ESCALADE

    + + + +
    • Quelle est l'utilité de cet équipement?

    • +
      + + + +
      + +
    • Quel noeud de huit est bien réalisé?

    • + + + + +
    • Quels sont les 5 temps de l'assurage?

    • + +
      1. + +

      2. + +
      3. + +

      4. + +
      5. + +

      6. + +
      7. +

      8. + +
      9. + +
      10. +
      + +
    • Où doit on passer la corde pour grimper, sur l'image ci-dessous?

    • + +
      + + + + + + +
    • Sur le même baudrier, où met-on le système d'assurage?

    • + + + + + + +
    • Quel système d'assurage bloque automatiquement la corde?

    • + + + +
      + + +

      + + + + +




      + + +


      +
      come to see us
      + + + +
    + + diff --git a/sioa/NetBeansProjects/Quizz/public_html/Quizz.CSS b/sioa/NetBeansProjects/Quizz/public_html/Quizz.CSS new file mode 100644 index 0000000..a6ebc49 --- /dev/null +++ b/sioa/NetBeansProjects/Quizz/public_html/Quizz.CSS @@ -0,0 +1,27 @@ +html +{margin: 0; +padding: 0;} + +h1 +{background-color: BLACK; +color: #00FF00; +text-align: CENTER} + + +.submit +{background-color: #3fb6b2; +padding:12px 45px; +border-radius: 5px; +cursor: pointer; +color: #ffffff; +margin-left: 35%; +font-weight: bold;} + +html { + margin:0; + padding:0; + background: url("https://www.sohealthy.fr/wp-content/uploads/2019/09/Escalade-chamonix3.jpg") no-repeat center fixed; + -webkit-background-size: cover; + background-size: cover; +} +