-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGame.html
150 lines (139 loc) · 6.16 KB
/
Game.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!doctype html>
<html lang="fr">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Le Jeu des Paires est un jeu de mémoire qui se joue avec des cartes que l'on retourne afin de trouver des paires. Si la paire n'est pas valide, on reposionne les cartes face cachée.">
<meta name="keywords" content="Jeu, Paires, mémoire, cartes">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<link rel="stylesheet prefetch" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet prefetch" href="https://fonts.googleapis.com/css?family=Coda">
<link rel="stylesheet prefetch" href="https://fonts.googleapis.com/css?family=Gloria+Hallelujah|Permanent+Marker">
<link rel="apple-touch-icon" href="img/pair-of-cards.png">
<link rel="shortcut icon" href="img/pair-of-cards.ico" type="image/x-icon">
<title>Jeu des paires</title>
<script type="text/javascript">
function date_heure(id) {
date = new Date;
annee = date.getFullYear();
month = date.getMonth();
mois = new Array('Janvier','Février','Mars','Avril','Mai','Juin','Juillet','Août','Septembre','Octobre','Novembre','Décembre');
j = date.getDate();
jour = date.getDay();
jours = new Array('Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi');
h = date.getHours();
if(h<10) {
h = "0"+h;
}
m = date.getMinutes();
if(m<10) {
m = "0"+m;
}
s = date.getSeconds();
if(s<10) {
s = "0"+s;
}
resultat = 'Nous sommes le '+jours[jour]+' '+j+' '+mois[month]+' '+annee+'. Il est '+h+':'+m+':'+s;
document.getElementById(id).innerHTML = resultat;
setTimeout('date_heure("'+id+'");','1000');
return true;
}
</script>
</head>
<body>
<img src="img/pair-of-cards.png" alt="Image qui suit la souris" id="imageSuitSouris" style="position:absolute;display:block;z-index:5;"></img>
<!-- HEADER -->
<header>
<div class="container-fluid bg-dark text-white" style="width: 100%; height: 9em;">
<h1 class="pt-2 ml-4">Jeu des paires<i class="fa fa-gamepad pl-4"></i></h1>
<marquee behavior="" direction="left" class="mt-2 ml-4" style="font-size: large;"><span id="date_heure"></span></marquee>
<script type="text/javascript">window.onload = date_heure('date_heure');</script>
</div>
</header>
<!-- End of HEADER -->
<!-- MAIN -->
<main class="bg-info" style="height: 100%;">
<div class="container pt-2 sign">
<section id="scoreBoard" class="scoreDisplay mt-2">
<span class="moves">0</span>
<div class="timer">
</div>
<div class="restart" onclick=startGame()>
<i class="fa fa-repeat"></i>
</div>
</section>
</div>
<div id="gameBoard" class="container mb-2">
<ul class="deck" id="card-deck">
<li class="card" type="diamond">
<i class="fa fa-diamond"></i>
</li>
<li class="card" type="plane">
<i class="fa fa-paper-plane-o"></i>
</li>
<li class="card match" type="anchor">
<i class="fa fa-anchor"></i>
</li>
<li class="card" type="bolt" >
<i class="fa fa-bolt"></i>
</li>
<li class="card match" type="anchor">
<i class="fa fa-anchor"></i>
</li>
<li class="card" type="bicycle">
<i class="fa fa-bicycle"></i>
</li>
<li class="card" type="diamond">
<i class="fa fa-diamond"></i>
</li>
<li class="card" type="bomb">
<i class="fa fa-bomb"></i>
</li>
<li class="card" type="bomb">
<i class="fa fa-bomb"></i>
</li>
<li class="card open show" type="bolt">
<i class="fa fa-bolt"></i>
</li>
<li class="card" type="bicycle">
<i class="fa fa-bicycle"></i>
</li>
<li class="card" type="plane">
<i class="fa fa-paper-plane-o"></i>
</li>
</ul>
</div>
<div id="popup1" class="replay">
<div class="popup">
<h3>🎉 Félicitations ! Tu as gagné cette partie 😄</h3>
<a class="close" href=#>×</a>
<div class="congratulationsText">
<p>Tu as réussi avec <span id=finalMove></span> en <span id=totalTime></span></p>
</div>
<button id="play-again" onclick="playAgain()">
<a>Veux-tu rejouer ?</a>
</button>
</div>
</div>
</main>
<!-- End of MAIN -->
<!-- FOOTER -->
<footer>
<div class="jumbotron jumbotron-fluid mb-0 bg-dark text-white text-center" style="height: 3em;">
<div class="container">
<p class="text-center text-muted" style="font-size: large;">September 2020 © Tous droits réservés Mathieu Deriquehem</p>
</div>
</div>
</footer>
<!-- End of FOOTER -->
<!-- Optional JavaScript -->
<script src="js/main.js"></script>
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
</body>
</html>