diff --git a/SwichGIT/BDD/css.css b/SwichGIT/BDD/css.css deleted file mode 100644 index e69de29..0000000 diff --git a/SwichGIT/BDD/javasBDD.js b/SwichGIT/BDD/javasBDD.js deleted file mode 100644 index 3bc1694..0000000 --- a/SwichGIT/BDD/javasBDD.js +++ /dev/null @@ -1,128 +0,0 @@ - -const sqlite3 = require('sqlite3').verbose(); -const nomBDD = "morpion.db" -let db = new sqlite3.Database(nomBDD, sqlite3.OPEN_READWRITE, (err) => { - if (err) { - return console.error(err.message); - } - console.log('Connexion reussi a :', nomBDD); -}); - - - -function GenereChaine(){ - var texte = ""; - var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; - for (var i = 0; i < 8; i++) - texte += possible.charAt(Math.floor(Math.random() * possible.length)); - - return texte; -} - -function Insertion(table, colonne, valeur, colonne2, valeur2) { - db.run("UPDATE '" + table + "' SET " + colonne + " = " + valeur + " WHERE " + colonne2 + " = '" + valeur2 + "'") - console.log("Insertion de " + valeur + " reussi") -} - -function RecuperValeur(table, colonne, colonne2, valeur) { - var retour; - db.all("SELECT " +colonne+ " FROM " +table+ " WHERE " +colonne2+ "='" +valeur+"'", (err, data) => { - //console.log(data); - retour=data; - return retour; - }); - -} -var res = db.run("SELECT * FROM partie"); -console.log(res); - - -function InitialserBDD(){ - db.run('INSERT INTO PARTIE(id) VALUES(?)', [GenereChaine()]); -} - -function SupprimerLigne(id){ - db.run("DELETE FROM PARTIE where id='"+id+"'"); -} - -InitialserBDD(); -//Insertion("PARTIE","ptsj1","1","id","96FVGDWY"); -var dfs= RecuperValeur("PARTIE","ptsJ1","id","UFS6ySfL"); -console.log(dfs); - - - -/* -let sql = `SELECT * FROM PARTIE`; -db.all(sql, [], (err, rows) => { - if (err) { - throw err; - } - rows.forEach((row) => { - console.log(row.name); - }); -}); -*/ - -//ouverture de la base de donn� -/* -function test() { - var fullname; - var fname = "ptsj2"; - let sql = 'SELECT * FROM PARTIE'; - db.each(sql, [fname], (err, row) => { - if (err) { - throw err; - } - fullname = ('${row.Name}'); - alert(fullname);; - }); - db.close(); -} - -test(); - -*/ -/* -Insertion("PARTIE", "ptsJ1", 4, "id", "UFS6ySfL"); -Insertion("PARTIE", "ptsJ2", 100, "id", "UFS6ySfL"); - -Insertion("PARTIE", "ptsJ2", 10, "id", "96FVGDWY"); - -*/ - -//db.run('CREATE TABLE PARTIE(id varchar(8),ptsJ1 int,ptsj2 int)'); - - -//db.run('INSERT INTO score(id) VALUES(?)', ["J1"]) -//db.run('INSERT INTO score(id) VALUES(?)', ["J2"]) - -//UPDATE SCORE SET 'Two' = 2 WHERE ID = 'J1' - -db.all("SELECT * FROM PARTIE", (err, rows) => { - var res=""; - if (err) { - throw err - } - console.log("Affichage de la table partie\n") - rows.forEach((row)=>{ - res=res+row.name; - console.log(res); - - }); - - - -}); - - - -// fermeture de la base de donn� -db.close((err) => { - if (err) { - return console.error(err.message); - } - console.log('Fermeture de la base de donnes :',nomBDD); -}); - - diff --git a/SwichGIT/BDD/js.js b/SwichGIT/BDD/js.js deleted file mode 100644 index a723467..0000000 --- a/SwichGIT/BDD/js.js +++ /dev/null @@ -1,51 +0,0 @@ -function sdf(){ - window.alert("lksjdf"); -} - - -function creerPartie(){ - localStorage.setItem("nomJoueur", "J1"); -} - -function affichage(){ - document.getElementById("instructions").innerHTML = localStorage.getItem("nomJoueur"); - if( localStorage.getItem("nomJoueur") == 'J1'){ - document.getElementById("messages").innerHTML = "Tu joues les croix" - } - else{ - document.getElementById("messages").innerHTML = "Tu joues les ronds" - window.alert(localStorage.getItem("nomJoueur")); - } -} - - -function ValidateEmail(entre) -{ - if (entre!="X" ||(entre !="x")) - { - return (true) - } - alert("You have entered an invalid email address!") - return (false) -} - -/* -function rejoindrepartie(){ - localStorage.setItem("nomJoueur", "J2"); -} - -function Tourdequi(joueur){ - if(tab j1 + tabj2 .lenght %2==0){ - return J1; - } - - return J2; -} - -function finirpartie(){ - localStorage.removeItem("nomJoueur"); -} - -localStorage.setItem("lastname", "Smith"); -// Retrieve -document.getElementById("result").innerHTML = localStorage.getItem("lastname"); */ \ No newline at end of file diff --git a/SwichGIT/BDD/morpion.db b/SwichGIT/BDD/morpion.db deleted file mode 100644 index 1db8d2d..0000000 Binary files a/SwichGIT/BDD/morpion.db and /dev/null differ diff --git a/SwichGIT/BDD/p1.html b/SwichGIT/BDD/p1.html deleted file mode 100644 index ed469f3..0000000 --- a/SwichGIT/BDD/p1.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - Morpion - - - - -

-

- - - - - - - diff --git a/SwichGIT/BDD/p2.html b/SwichGIT/BDD/p2.html deleted file mode 100644 index 35844be..0000000 --- a/SwichGIT/BDD/p2.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - Morpion p2 - - - - - -
-

Morpion

-
-
-

-
-
-

Click in a box to play

-
-
- - - - -
- - - -
- - - -
- - - -
- - - - - - - diff --git a/SwichGIT/ServerPyt/.idea/ServerPyt.iml b/SwichGIT/ServerPyt/.idea/ServerPyt.iml deleted file mode 100644 index d0876a7..0000000 --- a/SwichGIT/ServerPyt/.idea/ServerPyt.iml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/SwichGIT/ServerPyt/.idea/inspectionProfiles/Project_Default.xml b/SwichGIT/ServerPyt/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 40985a1..0000000 --- a/SwichGIT/ServerPyt/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - \ No newline at end of file diff --git a/SwichGIT/ServerPyt/.idea/inspectionProfiles/profiles_settings.xml b/SwichGIT/ServerPyt/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 105ce2d..0000000 --- a/SwichGIT/ServerPyt/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/SwichGIT/ServerPyt/.idea/misc.xml b/SwichGIT/ServerPyt/.idea/misc.xml deleted file mode 100644 index d1e22ec..0000000 --- a/SwichGIT/ServerPyt/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/SwichGIT/ServerPyt/.idea/modules.xml b/SwichGIT/ServerPyt/.idea/modules.xml deleted file mode 100644 index e5fbddf..0000000 --- a/SwichGIT/ServerPyt/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/SwichGIT/ServerPyt/.idea/vcs.xml b/SwichGIT/ServerPyt/.idea/vcs.xml deleted file mode 100644 index 6c0b863..0000000 --- a/SwichGIT/ServerPyt/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/SwichGIT/ServerPyt/.idea/workspace.xml b/SwichGIT/ServerPyt/.idea/workspace.xml deleted file mode 100644 index b52d1c3..0000000 --- a/SwichGIT/ServerPyt/.idea/workspace.xml +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - - -