-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmemory-game.html
170 lines (130 loc) · 6.77 KB
/
memory-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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<title>Memory Game</title>
<!-- Bootstrap core CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
<link href="./css/memory-game.css" rel="stylesheet">
<!--need these scripts so modal wil work-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script src="./js/bootstrap.min.js"></script>
</head>
<body class="mainBackground">
<!-- Fixed navbar -->
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Memory Game</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<!--a href is used for bootstrap formatting purposes-->
<li onclick="quickStart()"><a href="#">Quick Start</a></li>
<li onclick="generateGame()"><a href="#">New Game</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<script src="./js/memory-game.js"></script>
<div id="endMessage" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Congratulations!</h4>
</div>
<div class="modal-body">
<p id="closeMessage"></p>
<p>After you close this window, select an option from the top right to play again!</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div id="settingsGame" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">New Game</h4>
</div>
<div class="modal-body">
<!--get user name-->
<label class="control-label settings-headings">Name:</label>
<input class="form-control" id="userName" type="text" placeholder="Enter name here">
<br/>
<!--get difficulty level-->
<div class="control-label settings-headings">Difficulty:</div>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="radio" name="difficulty" id="difficultyEasy" autocomplete="off" checked> Easy
</label>
<label class="btn btn-primary">
<input type="radio" name="difficulty" id="difficultyMedium" autocomplete="off"> Medium
</label>
<label class="btn btn-primary">
<input type="radio" name="difficulty" id="difficultyHard" autocomplete="off"> Hard
</label>
</div>
<!--get card theme -->
<div class="control-label settings-headings">Card theme:</div>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="radio" name="cardTheme" id="animals" autocomplete="off" checked> Animals
</label>
<label class="btn btn-primary">
<input type="radio" name="cardTheme" id="fruit" autocomplete="off"> Fruit
</label>
</div>
<!--set window background-->
<div class="control-label settings-headings">Card texture:</div>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="radio" name="cardTexture" id="texture1" autocomplete="off" checked> <img class="form-image" src="./images/rubiks.png" alt="rubiks cube"/>
</label>
<label class="btn btn-primary">
<input type="radio" name="cardTexture" id="texture2" autocomplete="off"> <img class="form-image" src="./images/texture.jpg" alt="simple texture"/>
</label>
<label class="btn btn-primary">
<input type="radio" name="cardTexture" id="texture3" autocomplete="off"> <img class="form-image" src="./images/escher.png" alt="escher drawing"/>
</label>
</div>
<!--get card texture-->
<div class="control-label settings-headings">Screen background:</div>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="radio" name="backgroundImage" id="bgOption1" autocomplete="off" checked> <img class="form-image" src="./images/simpleBg.jpg" alt="simple background"/>
</label>
<label class="btn btn-primary">
<input type="radio" name="backgroundImage" id="bgOption2" autocomplete="off"> <img class="form-image" src="./images/footprints.jpg" alt="footprints"/>
</label>
<label class="btn btn-primary">
<input type="radio" name="backgroundImage" id="bgOption3" autocomplete="off"> <img class="form-image" src="./images/wolf.jpg" alt="wolf"/>
</label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" onclick="submitSettings()" data-dismiss="modal">Start game!</button>
</div>
</div>
</div>
</div>
</body>
</html>