+ * @createTime 2024-11-21 11:51:17
+ * @lastModified 2024-12-15 20:38:31
+ * Copyright ©Théo Mougnibas All rights reserved
+*/
+
+body {
+ background-color: #ecf0f1;
+ color: #ddd;
+ margin: 0;
+ padding: 40px;
+ background-image: url(../img/matrix.gif), url(../img/codevert.jpg);
+}
+
+button {
+ padding: 12px 25px;
+ border: none;
+ background-color: #000000;
+ color: white;
+ cursor: pointer;
+ border-radius: 20px;
+ font-weight: bold;
+ transition: background-color 0.3s ease;
+}
+
+button:hover {
+ background-color: #33ff00;
+}
+
+output {
+ font-size: 50px;
+ color: #ddd;
+ background-color: #000000;
+}
+
+img {
+ max-width: 100%;
+ height: auto;
+ border-radius: 15px;
+ box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
+}
+
+table {
+ width: 100%;
+ border-collapse: collapse;
+
+ border: 1px solid #ddd;
+}
+
+th {
+ padding: 12px;
+ text-align: left;
+ border: 1px solid #ccc;
+ color: #ddd;
+ font-size: 20px;
+}
+td {
+ padding: 10px;
+ text-align: left;
+ border: 1px solid #ddd;
+}
+
+table.table_magasin{
+ width: 150px;
+ padding: 12px;
+ margin-top: 10px;
+ margin-bottom: 10px;
+
+}
\ No newline at end of file
diff --git a/INSA/projet-clicodrome/css/t5.css b/INSA/projet-clicodrome/css/t5.css
new file mode 100644
index 0000000..3f7f947
--- /dev/null
+++ b/INSA/projet-clicodrome/css/t5.css
@@ -0,0 +1,70 @@
+/* t5.css - HTML 4.01 */
+body {
+ font-family: 'Helvetica Neue', sans-serif;
+ background-color: #fafafa;
+ color: #ddd;
+ margin: 0;
+ padding: 50px;
+ background-image: url(../img/codevertmatrix.gif);
+}
+
+h1, h2, h3 {
+ color: #e74c3c;
+ text-align: center;
+ margin-bottom: 25px;
+}
+
+output {
+ font-size: 50px;
+ color: #ddd;
+ background-color: #000000;
+}
+
+button {
+ padding: 15px 30px;
+ border: 2px solid #33ff00;
+ background-color: #ecf0f1;
+ color: #33ff00;
+ cursor: pointer;
+ border-radius: 25px;
+ font-size: 16px;
+ transition: background-color 0.3s ease;
+}
+
+button:hover {
+ background-color: #33ff00;
+ color: white;
+}
+
+img {
+ max-width: 100%;
+ height: auto;
+ border-radius: 10px;
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
+}
+
+table {
+ width: 100%;
+ border-collapse: collapse;
+ border: 1px solid #ecf0f1;
+}
+
+td, th {
+ padding: 15px;
+ text-align: left;
+ border: 1px solid #ecf0f1;
+}
+table.table_magasin{
+ width: 150px;
+ padding: 12px;
+ margin-top: 10px;
+ margin-bottom: 10px;
+
+}
+a{
+ color: #33ff00;
+
+}
+a.hoover{
+ color: #ffffff;
+}
\ No newline at end of file
diff --git a/INSA/projet-clicodrome/css/t6.css b/INSA/projet-clicodrome/css/t6.css
new file mode 100644
index 0000000..6f316b5
--- /dev/null
+++ b/INSA/projet-clicodrome/css/t6.css
@@ -0,0 +1,49 @@
+/* t6.css - XHTML 4.01 */
+body {
+ font-family: 'Verdana', sans-serif;
+ background-color: #ffffff;
+ color: #2c3e50;
+ margin: 0;
+ padding: 60px;
+}
+
+
+
+button {
+ padding: 18px 35px;
+ border: none;
+ background-color: #e74c3c;
+ color: white;
+ cursor: pointer;
+ border-radius: 5px;
+ font-size: 18px;
+}
+
+button:hover {
+ background-color: #fda500;
+}
+
+img {
+ max-width: 100%;
+ height: auto;
+ border-radius: 5px;
+ box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
+}
+
+table {
+ width: 100%;
+ border-collapse: collapse;
+}
+
+td, th {
+ padding: 18px;
+ text-align: left;
+ border: 1px solid #ddd;
+}
+table.table_magasin{
+ width: 150px;
+ padding: 12px;
+ margin-top: 10px;
+ margin-bottom: 10px;
+
+}
\ No newline at end of file
diff --git a/INSA/projet-clicodrome/css/t7.css b/INSA/projet-clicodrome/css/t7.css
new file mode 100644
index 0000000..5f29392
--- /dev/null
+++ b/INSA/projet-clicodrome/css/t7.css
@@ -0,0 +1,58 @@
+/* t7.css - XHTML 1.0 */
+body {
+ font-family: 'Segoe UI', serif;
+ background-color: #ecf0f1;
+ color: #34495e;
+ margin: 0;
+ padding: 70px;
+}
+
+output {
+ font-size: 30px;
+
+}
+
+button {
+ padding: 15px 30px;
+ border: 2px solid #e74c3c;
+ background-color: white;
+ color: #e74c3c;
+ cursor: pointer;
+ border-radius: 25px;
+ font-size: 20px;
+ transition: transform 0.2s ease;
+}
+
+button:hover {
+ transform: scale(1.1);
+ background-color: #e74c3c;
+ color: white;
+}
+
+img {
+ max-width: 100%;
+ height: auto;
+ border-radius: 20px;
+ box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
+}
+
+table {
+ width: 100%;
+ border-collapse: collapse;
+ border: 2px solid #ff9900;
+
+}
+
+td, th {
+ padding: 20px;
+ text-align: left;
+ border: 1px solid #ff9900;
+
+}
+table.table_magasin{
+ width: 150px;
+ padding: 12px;
+ margin-top: 10px;
+ margin-bottom: 10px;
+
+}
\ No newline at end of file
diff --git a/INSA/projet-clicodrome/css/t8.css b/INSA/projet-clicodrome/css/t8.css
new file mode 100644
index 0000000..71a3c9f
--- /dev/null
+++ b/INSA/projet-clicodrome/css/t8.css
@@ -0,0 +1,73 @@
+/* t8.css - HTML 5 */
+body {
+ font-family: 'Roboto', sans-serif;
+ background-color: #f5f5f5;
+ color: #333;
+ margin: 0;
+ padding: 80px;
+}
+
+h1, h2, h3 {
+ color: #16a085;
+ text-align: center;
+ margin-bottom: 30px;
+ font-weight: 700;
+}
+
+button {
+ padding: 20px 40px;
+ border: none;
+ background-color: #e74c3c;
+ color: white;
+ cursor: pointer;
+ border-radius: 50px;
+ font-size: 22px;
+ box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
+ transition: background-color 0.3s ease, transform 0.2s ease;
+}
+
+button:hover {
+ background-color: #ff9900;
+ transform: translateY(-3px);
+}
+
+img {
+ max-width: 100%;
+ height: auto;
+ border-radius: 20px;
+ box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
+}
+
+table {
+ width: 100%;
+ border-collapse: collapse;
+ border: 2px solid #ff9900;
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
+}
+
+td, th {
+ padding: 25px;
+ text-align: left;
+ border: 1px solid #ff9900;
+ font-size: 18px;
+}
+
+td {
+ background-color: #ecf0f1;
+}
+
+th {
+ background-color: #ff9900;
+ color: white;
+}
+
+table tr:hover {
+ background-color: #f1f1f1;
+}
+table.table_magasin{
+ width: 150px;
+ padding: 12px;
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+
diff --git a/INSA/projet-clicodrome/css/t9.css b/INSA/projet-clicodrome/css/t9.css
new file mode 100644
index 0000000..049aad0
--- /dev/null
+++ b/INSA/projet-clicodrome/css/t9.css
@@ -0,0 +1,91 @@
+/* t9.css - XHTML 5 */
+body {
+ font-family: 'Montserrat', sans-serif;
+ background-color: #ffffff;
+ color: #2c3e50;
+ margin: 0;
+ padding: 90px;
+
+
+}
+
+h1, h2, h3 {
+ color: #2980b9;
+ text-align: center;
+ font-weight: 800;
+ text-transform: uppercase;
+ margin-bottom: 35px;
+}
+
+button {
+ padding: 25px 50px;
+ border: none;
+ background-color: #e74c3c;
+ color: white;
+ cursor: pointer;
+ border-radius: 40px;
+ font-size: 24px;
+ font-weight: 600;
+ letter-spacing: 1px;
+ transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
+}
+
+button:hover {
+ background-color: #ff9900;
+ transform: translateY(-5px);
+ box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
+}
+
+button:active {
+ transform: translateY(2px);
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
+}
+
+img {
+ max-width: 100%;
+ height: auto;
+ border-radius: 25px;
+ box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
+ transition: transform 0.3s ease;
+}
+
+img:hover {
+ transform: scale(1.05);
+}
+
+table {
+ width: 100%;
+ border-collapse: collapse;
+ border: 3px solid #ff9900;
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
+}
+
+td, th {
+ padding: 30px;
+ text-align: left;
+ border: 1px solid #ff9900;
+ font-size: 20px;
+ letter-spacing: 1px;
+}
+
+td {
+ background-color: #ecf0f1;
+}
+
+th {
+ background-color: #ff9900;
+ color: white;
+ text-transform: uppercase;
+}
+
+table tr:hover {
+ background-color: #b61212;
+}
+
+table.table_magasin{
+ width: 150px;
+ padding: 12px;
+ margin-top: 10px;
+ margin-bottom: 10px;
+
+}
diff --git a/INSA/projet-clicodrome/img/330px-Margaret_Hamilton_-_restoration.jpg b/INSA/projet-clicodrome/img/330px-Margaret_Hamilton_-_restoration.jpg
new file mode 100644
index 0000000..ca87bac
Binary files /dev/null and b/INSA/projet-clicodrome/img/330px-Margaret_Hamilton_-_restoration.jpg differ
diff --git a/INSA/projet-clicodrome/img/390px-Commodore_Grace_M._Hopper,_USN_(covered).jpg b/INSA/projet-clicodrome/img/390px-Commodore_Grace_M._Hopper,_USN_(covered).jpg
new file mode 100644
index 0000000..e974c44
Binary files /dev/null and b/INSA/projet-clicodrome/img/390px-Commodore_Grace_M._Hopper,_USN_(covered).jpg differ
diff --git a/INSA/projet-clicodrome/img/390px-Dennis_Ritchie_2011.jpg b/INSA/projet-clicodrome/img/390px-Dennis_Ritchie_2011.jpg
new file mode 100644
index 0000000..008a847
Binary files /dev/null and b/INSA/projet-clicodrome/img/390px-Dennis_Ritchie_2011.jpg differ
diff --git a/INSA/projet-clicodrome/img/390px-Tim_Berners-Lee_closeup.jpg b/INSA/projet-clicodrome/img/390px-Tim_Berners-Lee_closeup.jpg
new file mode 100644
index 0000000..e7be579
Binary files /dev/null and b/INSA/projet-clicodrome/img/390px-Tim_Berners-Lee_closeup.jpg differ
diff --git a/INSA/projet-clicodrome/img/Ada_Byron_daguerreotype_by_Antoine_Claudet_1843_or_1850_-_cropped.png b/INSA/projet-clicodrome/img/Ada_Byron_daguerreotype_by_Antoine_Claudet_1843_or_1850_-_cropped.png
new file mode 100644
index 0000000..54f9877
Binary files /dev/null and b/INSA/projet-clicodrome/img/Ada_Byron_daguerreotype_by_Antoine_Claudet_1843_or_1850_-_cropped.png differ
diff --git a/INSA/projet-clicodrome/img/Alan_Turing_(1912-1954)_in_1936_at_Princeton_University.jpg b/INSA/projet-clicodrome/img/Alan_Turing_(1912-1954)_in_1936_at_Princeton_University.jpg
new file mode 100644
index 0000000..afa4889
Binary files /dev/null and b/INSA/projet-clicodrome/img/Alan_Turing_(1912-1954)_in_1936_at_Princeton_University.jpg differ
diff --git a/INSA/projet-clicodrome/img/ClaudeShannon_MFO3807.jpg b/INSA/projet-clicodrome/img/ClaudeShannon_MFO3807.jpg
new file mode 100644
index 0000000..66ce9cc
Binary files /dev/null and b/INSA/projet-clicodrome/img/ClaudeShannon_MFO3807.jpg differ
diff --git a/INSA/projet-clicodrome/img/Frances_Bilas_Spence_feeding_punch_cards_into_ENIAC,_Feb_1946.png b/INSA/projet-clicodrome/img/Frances_Bilas_Spence_feeding_punch_cards_into_ENIAC,_Feb_1946.png
new file mode 100644
index 0000000..b01ae12
Binary files /dev/null and b/INSA/projet-clicodrome/img/Frances_Bilas_Spence_feeding_punch_cards_into_ENIAC,_Feb_1946.png differ
diff --git a/INSA/projet-clicodrome/img/GIF-CHATON.gif b/INSA/projet-clicodrome/img/GIF-CHATON.gif
new file mode 100644
index 0000000..4e7ebbb
Binary files /dev/null and b/INSA/projet-clicodrome/img/GIF-CHATON.gif differ
diff --git a/INSA/projet-clicodrome/img/George_Boole_color.jpg b/INSA/projet-clicodrome/img/George_Boole_color.jpg
new file mode 100644
index 0000000..8de96c7
Binary files /dev/null and b/INSA/projet-clicodrome/img/George_Boole_color.jpg differ
diff --git a/INSA/projet-clicodrome/img/LinuxCon_Europe_Linus_Torvalds_03_(cropped).jpg b/INSA/projet-clicodrome/img/LinuxCon_Europe_Linus_Torvalds_03_(cropped).jpg
new file mode 100644
index 0000000..a337233
Binary files /dev/null and b/INSA/projet-clicodrome/img/LinuxCon_Europe_Linus_Torvalds_03_(cropped).jpg differ
diff --git a/INSA/projet-clicodrome/img/codevert.jpg b/INSA/projet-clicodrome/img/codevert.jpg
new file mode 100644
index 0000000..756996a
Binary files /dev/null and b/INSA/projet-clicodrome/img/codevert.jpg differ
diff --git a/INSA/projet-clicodrome/img/codevertmatrix.gif b/INSA/projet-clicodrome/img/codevertmatrix.gif
new file mode 100644
index 0000000..1fea26a
Binary files /dev/null and b/INSA/projet-clicodrome/img/codevertmatrix.gif differ
diff --git a/INSA/projet-clicodrome/img/matrix.gif b/INSA/projet-clicodrome/img/matrix.gif
new file mode 100644
index 0000000..6120fd6
Binary files /dev/null and b/INSA/projet-clicodrome/img/matrix.gif differ
diff --git a/INSA/projet-clicodrome/img/miaou1.jpeg b/INSA/projet-clicodrome/img/miaou1.jpeg
new file mode 100644
index 0000000..e14c29d
Binary files /dev/null and b/INSA/projet-clicodrome/img/miaou1.jpeg differ
diff --git a/INSA/projet-clicodrome/img/tecktonik.jpeg b/INSA/projet-clicodrome/img/tecktonik.jpeg
new file mode 100644
index 0000000..86a7d3f
Binary files /dev/null and b/INSA/projet-clicodrome/img/tecktonik.jpeg differ
diff --git a/INSA/projet-clicodrome/index.html b/INSA/projet-clicodrome/index.html
new file mode 100644
index 0000000..01d5491
--- /dev/null
+++ b/INSA/projet-clicodrome/index.html
@@ -0,0 +1,81 @@
+
+
+
+
+
+ Prog Web Legend
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Le Méga Boost du Prof
+
+
+
+
+
+
+ nom
+ revenu passif
+ cout
+ lien
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/INSA/projet-clicodrome/js/alerte.js b/INSA/projet-clicodrome/js/alerte.js
new file mode 100644
index 0000000..7d5076a
--- /dev/null
+++ b/INSA/projet-clicodrome/js/alerte.js
@@ -0,0 +1,52 @@
+// prévention de l'empilement d'alertes, qui entrainerait la suppression de tous les messages sauf le dernier
+// Pour cela, on utilise une file et une fonction asynchrone qui boucle et vide la file alerte par alerte
+let file_alertes = []
+
+function ouvrirAlerte(message){
+ file_alertes.push(message)
+
+ // si c'est la seule alerte en attente, on l'affiche
+ if(file_alertes.length == 1 ) {
+ afficherAlerte(file_alertes[0])
+ }
+ // sinon, elle sera automatiquement affichée lors de la fermeture de l'alerte juste avant dans la file
+}
+
+
+// Fonction pour afficher une alerte mais plus jolie que celle par défaut
+function afficherAlerte(message) {
+
+ // on signale une alerte en train d'être visionnée
+ flag = true
+
+
+ // on prend les elements
+ let modal = document.getElementById('alerte_jolie');
+
+ var messageElement = document.getElementById('message_alerte_jolie');
+
+ // Mettre le message
+ messageElement.textContent = message;
+
+ // et on affiche en changeant la propriété css
+ modal.style.display = "block";
+}
+
+
+// Fonction pour fermer l'alerte
+function fermerAlerte() {
+
+ var modal = document.getElementById('alerte_jolie');
+
+ // et on cache en changeant la propriété css
+ modal.style.display = "none";
+
+ // enlève notre élément de la file
+ file_alertes.shift()
+
+ // affiche récursivement les autres alertes en attentes
+ if(file_alertes.length > 0){
+ afficherAlerte(file_alertes[0])
+ }
+
+}
diff --git a/INSA/projet-clicodrome/js/collegue.js b/INSA/projet-clicodrome/js/collegue.js
new file mode 100644
index 0000000..0a22b81
--- /dev/null
+++ b/INSA/projet-clicodrome/js/collegue.js
@@ -0,0 +1,10 @@
+class Collegue{
+ constructor(json) {
+ this.props = json
+ this.nom = this.props.nom
+ this.cout = this.props.cout
+ this.boost = this.props.boost
+ this.revenu_passif = this.props.revenu_passif
+ }
+
+}
\ No newline at end of file
diff --git a/INSA/projet-clicodrome/js/element.js b/INSA/projet-clicodrome/js/element.js
new file mode 100644
index 0000000..44c0caa
--- /dev/null
+++ b/INSA/projet-clicodrome/js/element.js
@@ -0,0 +1,32 @@
+class Element{
+ constructor(techno,tag) {
+ this.tag = tag
+ this.techno = techno
+ }
+
+ async chargerDepuisBdd(){
+ let data = await fetch("../bdd/arbre.json")
+ data = await data.json()
+
+ this.props = data["technologies"][this.techno]["elements"][this.tag]
+ this.cout = this.props.cout
+ this.nom = this.props.nom
+ this.boost = this.props.boost
+ }
+
+ afficherDropsDansHtml(){
+ const table= document.getElementById("table_technologies_body")
+
+ const tr = document.createElement("tr")
+ const nom = document.createElement("td")
+ nom.innerText = this.nom
+ const boost = document.createElement("td")
+ boost.innerText = this.boost
+
+ tr.appendChild(nom)
+ tr.appendChild(boost)
+ table.appendChild(tr)
+
+ }
+
+}
\ No newline at end of file
diff --git a/INSA/projet-clicodrome/js/intro.js b/INSA/projet-clicodrome/js/intro.js
new file mode 100644
index 0000000..5002e9b
--- /dev/null
+++ b/INSA/projet-clicodrome/js/intro.js
@@ -0,0 +1,27 @@
+document.addEventListener("click",firstClick)
+
+
+function firstClick(){
+ let position_button=document.getElementById("div_button")
+ let position_score=document.getElementById("div_score")
+
+ const score_aff = document.createElement("output")
+ score_aff.innerText="SCORE"
+ score_aff.id = "score_affichage"
+
+ const click = document.createElement("button")
+ click.innerText="click"
+
+ position_score.appendChild(score_aff)
+ position_button.appendChild(click)
+
+ click.addEventListener("click",scoreCount)
+
+
+ document.removeEventListener("click",firstClick)
+
+ augmenterScorePassivement()
+
+}
+
+
diff --git a/INSA/projet-clicodrome/js/main.js b/INSA/projet-clicodrome/js/main.js
new file mode 100644
index 0000000..4cf3e86
--- /dev/null
+++ b/INSA/projet-clicodrome/js/main.js
@@ -0,0 +1,392 @@
+let score = 0
+
+// stoque les ameliorations deja disponibles dans le magasin pour ne pas le faire clignoter
+let magasin_tech = {}
+
+let magasin_coll = {}
+
+// stoquer les ameliorations deja achetees pour ne pas les afficher dans le magasin
+let sacado = {}
+
+// premet de ne pas laisser le joueur acheter html 5 si il n'a pas débloqué html 1.0 etc..
+let evolution_tech = 0
+let evolution_coll = 0
+
+// variable qui permet d'augmenter la taille de l'incrément du score pour chaque clic, en fonction de la technlologie déloquée
+let boost = 1
+
+let revenu_passif = 0
+
+
+
+async function remplirMagasinTechnologies(){
+
+
+ const table= document.getElementById("table_magasin_technologies_body")
+
+ let data = await fetch("../bdd/arbre.json")
+ data = await data.json()
+
+
+ let tech = data["technologies"]
+
+ for(const key in tech){
+ // ne va pas s'embeter à proecess si on a deja acheté l'amelioration
+ if(!sacado[key] && !magasin_tech[key]){
+ el = tech[key]
+
+
+
+ const tr = document.createElement("tr")
+ const case_nom = document.createElement("td")
+ case_nom.innerText = el.nom
+ const case_boost = document.createElement("td")
+ case_boost.innerText = el.boost
+ const case_cout = document.createElement("td")
+ case_cout.innerText = el.cout
+
+ const test = document.createElement("td")
+ const btn_acheter = document.createElement("button")
+
+
+ let t = new Technologie(el)
+
+ /* fonction qui va s'activer lorsqu'on achète l'objet*/
+ btn_acheter.addEventListener("click", (event) =>{
+
+
+ // ne laisse acheter que si on a l'argent
+ if(score >= t.cout){
+
+
+ // incrémente le score implicite d'evolution pour permettre à la prochaine amelioration de s'afficher
+ evolution_tech += 1
+
+ // on améliore le style de la page :)
+ t.appliquerAmeliorationStyle()
+
+ // et on ajouter l'amélioration dans l'abre des compétences débloquées
+ sacado[key] = true
+
+
+
+ // on refresh le magasin pour enlever l'amelioration de la liste
+ // vide le ventre du magasin
+ table.innerHTML = ""
+ magasin_tech = {}
+ remplirMagasinTechnologies()
+
+
+ // finalement, on lui débit son compte de points tel un vendeur de voitures
+ score -= t.cout
+ majAffichageScore()
+
+ // augmentation du boost d'incrément
+ ouvrirAlerte("Incrémentation de la rentabilité de tes clicks de "+t.boost+" points !!")
+
+ if(t.props.evolution == 0){
+ boost += t.boost -1 // car sinon, le premier boost ne va pas entrainer un nombre rond de points par click :)
+
+ }else{
+ boost += t.boost
+ }
+
+ }else{
+ // PAS ASSEZ RICHE !!!!!
+ ouvrirAlerte("PAS ASSEZ RICHE !!!!!!!!!!!!")
+ }
+
+
+ })
+
+ btn_acheter.innerText = "Acheter"
+
+ // n'afficher l'amélioration que si le score est assez élevé
+ if((t.props.borne <= score) && (evolution_tech === parseInt(t.props.evolution))){
+ ouvrirAlerte(tech[key]["narration"])
+ // met à jour le contenu du magasin
+ // pour ne pas re-afficher cette ligne et éviter un clignotement
+ magasin_tech[key] = true
+
+ test.appendChild(btn_acheter)
+
+
+ tr.appendChild(case_nom)
+ tr.appendChild(case_boost)
+ tr.appendChild(case_cout)
+ tr.appendChild(test)
+
+ table.appendChild(tr)
+ }
+ }
+
+
+ }
+
+}
+
+
+async function remplirMagasinCollegues(){
+
+
+ const table= document.getElementById("table_magasin_collegues_body")
+
+ let data = await fetch("../bdd/arbre.json")
+ data = await data.json()
+
+
+ let collegues = data["collegues"]
+
+ for(const key in collegues){
+ // ne va pas s'embeter à proecess si déjà présent dans le magasin
+ // ou si le score d'évolution n'est pas assez élevé
+ const el = collegues[key]
+ if(!magasin_coll[key] && evolution_coll === parseInt(el.evolution)){
+
+
+
+ const tr = document.createElement("tr")
+ const case_nom = document.createElement("td")
+ case_nom.innerText = el.nom
+ const case_boost = document.createElement("td")
+ case_boost.innerText = el.revenu_passif
+ const case_cout = document.createElement("td")
+ case_cout.innerText = el.cout
+ case_cout.id = "case_cout_"+key
+
+ // case contenant un lien vers la page wikipédia du personnage
+ const case_wiki = document.createElement("td")
+ let a = document.createElement("a")
+ a.href = el.wikipedia
+ a.innerText = el.nom
+ case_wiki.appendChild(a)
+
+
+ const action = document.createElement("td")
+ const btn_acheter = document.createElement("button")
+
+
+ let c = new Collegue(el)
+
+
+ /* fonction qui va s'activer lorsqu'on achète l'objet*/
+ btn_acheter.addEventListener("click", (event) =>{
+
+ // calcul du cout en fonction du nombre de collegue de ce type déjà acheté
+ let exp = 0
+ if(key in sacado){
+ exp = sacado[key]
+ }
+ const cout_reel = Number(el.cout * (1.1)**exp).toFixed(1)
+
+ // ne laisse acheter que si on a l'argent
+ if(score >= cout_reel){
+
+
+ if(!(key in sacado)){
+
+ //lancer l'animation d'achat avec l'image correspondante
+ let image = document.getElementById("image-collegue-animee")
+ image.setAttribute("src",c.props.nom_fichier_image)
+ // affiche l'image
+ image.removeAttribute("hidden")
+
+ // PLUIE DE CONFETTTIIII
+ genererConfetti()
+
+
+ // recache l'image après 6 secondes et lance la narration
+ setTimeout(() => {
+ image.setAttribute("hidden",true)
+
+ // narration comme c'est la première fois qu'on achète
+
+ ouvrirAlerte("Vous avez débloqué "+ c.nom+" !!"+collegues[key]["narration"])
+ ouvrirAlerte("Incrémentation de la rentabilité passive de "+c.revenu_passif+" points !!")
+
+ }, (4000));
+
+ // on ajoute l'amélioration dans l'abre des compétences débloquées
+ sacado[key] = 1
+
+ // incrémente le score implicite d'evolution pour permettre à la prochaine amelioration de s'afficher
+ evolution_coll += 1
+
+ }else{
+ // on incrémente la qtt d'objet dans son sacado
+ sacado[key] += 1
+ }
+
+ // augmentation du boost d'incrément
+ revenu_passif += c.revenu_passif
+
+ // finalement, on lui débit son compte de points tel un vendeur de voitures
+ console.log(cout_reel)
+ console.log(score)
+ console.log(score-cout_reel)
+ score = score - cout_reel
+ majAffichageScore()
+
+ // on change le futur cout dans le tableau
+ document.getElementById("case_cout_"+key).innerText = Number(c.cout * (1.1)**sacado[key]).toFixed(1)
+
+
+ }else{
+ // PAS ASSEZ RICHE !!!!!
+ ouvrirAlerte("PAS ASSEZ RICHE !!!!!!!!!!!!")
+ }
+
+
+ })
+
+ btn_acheter.innerText = "Acheter"
+
+ // met à jour le contenu du magasin
+ // pour ne pas re-afficher cette ligne et éviter un clignotement
+ magasin_coll[key] = true
+
+ action.appendChild(btn_acheter)
+
+
+ tr.appendChild(case_nom)
+ tr.appendChild(case_boost)
+ tr.appendChild(case_cout)
+ tr.appendChild(case_wiki)
+ tr.appendChild(action)
+
+ table.appendChild(tr)
+
+ }
+
+
+ }
+
+}
+
+function majAffichageScore(){
+ const score_aff = document.getElementById("score_affichage")
+ score = Number((score).toFixed(1))
+ score_aff.textContent ="SCORE : " + rendreNombreLisible(score)
+
+}
+
+// fonction appelée à chaque clic de souris
+function scoreCount(){
+ score += boost
+ majAffichageScore()
+ // check refresh la table magasin pour afficher une amélioration si un palier est atteint
+ remplirMagasinTechnologies()
+ remplirMagasinCollegues()
+}
+
+// revenu passif à chaque seconde
+
+function augmenterScorePassivement(){
+ score += revenu_passif
+ majAffichageScore()
+ setTimeout(() => {
+ augmenterScorePassivement()
+ }, 1000)
+}
+
+function leBoostDuProf(){
+ score += 10000000000000000
+ majAffichageScore()
+}
+
+
+// fonction qui va creer plein d'elements confetti
+function genererConfetti() {
+
+ const container = document.getElementById("confetti-container")
+
+ // couleurs des confetti à generer
+ const colors = ["#FF5733", "#33FF57", "#3357FF", "#FF33A1", "#FFD633", "#A833FF", "#33FFF6"]
+
+ const nb_confetti = 150 // nombre de confettis
+
+ for (let i = 0; i < nb_confetti; i++) {
+
+ //créer un nouvel element de classe confetti
+ const confetti = document.createElement("div")
+ confetti.classList.add("confetti")
+
+ //prendre une couleur aléatoire dans la liste
+ confetti.style.setProperty("background-color", colors[Math.floor(Math.random() * colors.length)])
+
+ // positionner le confetti à un endroit random horizontalement
+ confetti.style.left = Math.random() * 100 + "vw"
+
+ // mettre une fraction de 5s pour faire un temps à l'écran assez naturel
+ const longevite = Math.random() * 5
+ confetti.style.animationDelay = longevite+"s"
+
+ // faire des confettis qui vont plus vite que d'autres
+ confetti.style.animationDuration = 4 + Math.random() * 2 + "s"
+
+ // ajouter le confetti au container
+ container.appendChild(confetti)
+
+ }
+
+ setTimeout(() => {
+ // vide le conteneur à la fin pour ne pas surcharger la page d'elements
+ container.innerHTML = ""
+ }, 10000);
+
+}
+
+
+function rendreNombreLisible(n){
+ let ret = n
+
+ if(n>=1000){
+ const quantifiers = [
+ "Millier", // 10^3
+ "Million", // 10^6
+ "Milliard", // 10^9
+ "Billion", // 10^12
+ "Billiard", // 10^15
+ "Trillion", // 10^18
+ "Trilliard", // 10^21
+ "Quadrillion", // 10^24
+ "Quadrilliard", // 10^27
+ "Quintillion", // 10^30
+ "Quintilliard", // 10^33
+ "Sextillion", // 10^36
+ "Sextilliard", // 10^39
+ "Septillion", // 10^42
+ "Septilliard", // 10^45
+ "Octillion", // 10^48
+ "Octilliard", // 10^51
+ "Nonillion", // 10^54
+ "Nonilliard", // 10^57
+ "Décillion", // 10^60
+ "Décilliard", // 10^63
+ "Undécillion", // 10^66
+ ];
+ // on enlève la virgule et la partie decimal pour ne pas
+ // fausser la longueur du string
+ const rpz_string = Number(n).toFixed(0)+""
+ // les qualificatifs étant par puissance de mille,
+ // compte la puissance de 10 mais divisée par 3
+ const puiss_mil = Math.floor((rpz_string.length-1)/3)
+
+ // ici, on ne garde que jusqu'à la centaine de l'unité choisie
+ // et on le met dans la variable de retour
+ ret = Math.floor( n/(10**(3*puiss_mil)) )
+
+ // enfin, on rajoute le quantificateur, avec un 's' si on est pas à l'unité
+ let q = " "+ quantifiers[puiss_mil -1]
+ if(ret != 1){
+ q +='s'
+ }
+
+ ret += q
+
+ }
+
+ return ret
+
+
+}
\ No newline at end of file
diff --git a/INSA/projet-clicodrome/js/technologie.js b/INSA/projet-clicodrome/js/technologie.js
new file mode 100644
index 0000000..054f1e5
--- /dev/null
+++ b/INSA/projet-clicodrome/js/technologie.js
@@ -0,0 +1,15 @@
+class Technologie{
+ constructor(json) {
+ this.props = json
+ this.cout = this.props.cout
+ this.boost = this.props.boost
+ this.nom = this.props.nom
+ }
+
+ appliquerAmeliorationStyle(){
+ document.getElementById("alerte-css").setAttribute("href","css/alerte/a"+evolution_tech+".css")
+ document.getElementById("link-css").setAttribute("href","css/"+this.props.css_id)
+ }
+
+
+}
\ No newline at end of file
diff --git a/INSA/projet-clicodrome/lisezmoi.md b/INSA/projet-clicodrome/lisezmoi.md
new file mode 100644
index 0000000..25f88ce
--- /dev/null
+++ b/INSA/projet-clicodrome/lisezmoi.md
@@ -0,0 +1,49 @@
+# Projet de prog web
+
+- A simple cookie clicker
+- but every power up is on a technologic tree of web
+- the interface becomes more and more fancy
+- you can unlock AI, coworkers, html elements ....
+
+## Element properties
+- each element has its own passive or active boost
+- each element has a cost
+
+## coworkers properties
+- each coworker bring its own passive income per second
+- the coworker are:
+Ada Lovelace
+George Boole
+Grace Hopper
+Jean Bartik
+Claude Shannon
+Alan Turing
+Margaret Hamilton
+Tim Berners-Lee
+Dennis Ritchie
+Linus Torvald
+
+## Technologie properties
+- each technologies give a boost like double the gain per click.
+- the technologies are:
+HTML
+HTML+
+HTML 2.0
+HTML 3.2
+HTML 4.01
+XHTML 4.01
+XHTML 1.0
+HTML 5
+XHTML5
+
+## TOUDOU
+- rajouter dans le html des elements invisibles qui pop petit à petit et s'améliorent
+- mettre des animations quand le score change de milier ( feu d'artifice ?)
+- vidéos
+- ne faire apparaitre les header du tableau qu'au premier clic
+- faire une fonction qui en fonction de la puissance de 10 troncature le nb et met "milions", "quintilions"...
+- mettre un palier où des photos aparaissent à coté de chaque collegue dans le magasin
+
+## Idée de con
+- Quand on débloque la balise vidéo , on rick roll le prof
+- Quand on débloque la sécurité , on a un capchat (on met juste une grosse image de chat) qui apparait
\ No newline at end of file
diff --git a/INSA/test.py b/INSA/test.py
new file mode 100644
index 0000000..e75154b
--- /dev/null
+++ b/INSA/test.py
@@ -0,0 +1 @@
+print("hello world")
\ No newline at end of file
diff --git a/Visual Studio Code.lnk b/Visual Studio Code.lnk
new file mode 100644
index 0000000..a0f47a6
Binary files /dev/null and b/Visual Studio Code.lnk differ
diff --git a/desktop.ini b/desktop.ini
new file mode 100644
index 0000000..c3a4af4
Binary files /dev/null and b/desktop.ini differ