Merge branch 'master' of https://git.etud.insa-toulouse.fr/fofana/Projet_Web
This commit is contained in:
commit
30fdc04c98
4 muutettua tiedostoa jossa 88 lisäystä ja 3 poistoa
|
|
@ -3,6 +3,7 @@
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="stylesheet" href="style.css" type="text/css">
|
<link rel="stylesheet" href="style.css" type="text/css">
|
||||||
|
<link rel="Javascript" href="Page1.js">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Projet Web</title>
|
<title>Projet Web</title>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="stylesheet" href="style.css" type="text/css">
|
<link rel="stylesheet" href="style.css" type="text/css">
|
||||||
|
<link rel="Javascript" href="Page1.js">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Puissance 4</title>
|
<title>Puissance 4</title>
|
||||||
|
|
@ -21,9 +22,15 @@
|
||||||
<main>
|
<main>
|
||||||
<section>
|
<section>
|
||||||
<article>
|
<article>
|
||||||
<div class="list">
|
<div id="Puissance4Board">
|
||||||
|
<div class="one">1</div>
|
||||||
</div>
|
<div class="two">2</div>
|
||||||
|
<div class="three">3</div>
|
||||||
|
<div class="four">4</div>
|
||||||
|
<div class="five">5</div>
|
||||||
|
<div class="six">6</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|
|
||||||
47
leo.js
Tavallinen tiedosto
47
leo.js
Tavallinen tiedosto
|
|
@ -0,0 +1,47 @@
|
||||||
|
|
||||||
|
let Jeu= true;
|
||||||
|
let Joueuractuel;
|
||||||
|
/*
|
||||||
|
|
||||||
|
function winverif(){
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
let cases = document.querySelectorAll(".case");
|
||||||
|
for(let i = 0 ;i< cases.length;i++)
|
||||||
|
{
|
||||||
|
Joueuractuel = i%2;
|
||||||
|
|
||||||
|
if (Joueuractuel){
|
||||||
|
|
||||||
|
|
||||||
|
cases[i].addEventListener("click",(event)=>{
|
||||||
|
cases[i].innerHTML = "0";
|
||||||
|
})
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
cases[i].addEventListener("click",(event)=>{
|
||||||
|
cases[i].innerHTML = "X";
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
document.getElementById("demo1").onclick = function() {myFunction()};
|
||||||
|
|
||||||
|
|
||||||
|
function myFunction() {
|
||||||
|
document.getElementById("demo1").innerHTML = "O";
|
||||||
|
}
|
||||||
|
document.getElementById("demo2").onclick = function() {myFunction()};
|
||||||
|
|
||||||
|
function myFunction() {
|
||||||
|
document.getElementById("demo2").innerHTML = "O";
|
||||||
|
}
|
||||||
|
document.getElementById("demo3").onclick = function() {myFunction()};
|
||||||
|
|
||||||
|
function myFunction() {
|
||||||
|
document.getElementById("demo3").innerHTML = "O";
|
||||||
|
}*/
|
||||||
30
style.css
30
style.css
|
|
@ -56,3 +56,33 @@ article
|
||||||
footer{
|
footer{
|
||||||
margin-top: auto;
|
margin-top: auto;
|
||||||
}
|
}
|
||||||
|
#Puissance4Board{
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: (6,7);
|
||||||
|
gap: 1em;
|
||||||
|
padding: 1em;
|
||||||
|
}
|
||||||
|
.one{
|
||||||
|
grid-column: 1;
|
||||||
|
grid-row: 1;
|
||||||
|
}
|
||||||
|
.two{
|
||||||
|
grid-column: 1;
|
||||||
|
grid-row: 1;
|
||||||
|
}
|
||||||
|
.three{
|
||||||
|
grid-column: 1;
|
||||||
|
grid-row: 1;
|
||||||
|
}
|
||||||
|
.four{
|
||||||
|
grid-column: 1;
|
||||||
|
grid-row: 1;
|
||||||
|
}
|
||||||
|
.five{
|
||||||
|
grid-column: 1;
|
||||||
|
grid-row: 1;
|
||||||
|
}
|
||||||
|
.six{
|
||||||
|
grid-column: 1;
|
||||||
|
grid-row: 1;
|
||||||
|
}
|
||||||
|
|
|
||||||
Ladataan…
Viittaa uudesa ongelmassa