forked from aannenko/noughts-and-crosses
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
160 lines (151 loc) · 8.8 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Noughts&Crosses</title>
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/style.css" media="all">
<link rel="icon" type="image/png" href="images/favicon.png" />
<script src="js/model.js" type="text/javascript"></script>
<script src="js/view-model.js" type="text/javascript"></script>
</head>
<body>
<header class="full_width">
<div class="container centered">
<div class="wrapper">
<div class="transformer">
<div class="flex_column">
<div class="flex_column_item">
<div class="header_block">
<div class="game_title blue">
<h2>Tic-Tac-Toe</h2>
</div>
<div id="start_game">
<button type="button" title="Start game" class="gray_bg" onclick="startGame()">
<span class="fa fa-play"></span>
<span class="fa fa-refresh orange collapsed"></span>
</button>
</div>
<div id="settings_btn">
<button type="button" title="Settings" class="gray_bg" onclick="settingsShow()">
<span class="fa fa-cog blue"></span></button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</header>
<section class="full_width" id="settings_container">
<div class="container centered">
<div class="wrapper">
<div class="transformer">
<div class="flex_column">
<div class="flex_column_item field_settings_group">
<div class="flex_row">
<div class="flex_row_item rows">
<button type="button" title="Increase rows" class="inc button gray_bg" onclick="increaseRows()">
<span class="fa fa-caret-up" aria-hidden="true"></span>
</button>
<div class="cell_count gray_bg blue">
<label for="rowsInput">Rows</label>
<input type="text" class="settings-control" id="rowsInput" value="" readonly>
</div>
<button type="button" title="Decrease rows" class="dec button gray_bg" onclick="decreaseRows()">
<span class="fa fa-caret-down" aria-hidden="true"></span>
</button>
</div>
<div class="flex_row_item columns">
<button type="button" title="Increase columns" class="inc button gray_bg" onclick="increaseColumns()">
<span class="fa fa-caret-up" aria-hidden="true"></span>
</button>
<div class="cell_count gray_bg blue">
<label for="columnsInput">Columns</label>
<input type="text" class="settings-control" id="columnsInput" value="" readonly>
</div>
<button type="button" title="Decrease columns" class="dec button gray_bg" onclick="decreaseColumns()">
<span class="fa fa-caret-down" aria-hidden="true"></span>
</button>
</div>
<div class="flex_row_item winLength">
<button type="button" title="Increase win length" class="inc button gray_bg" onclick="increaseWinLength()">
<span class="fa fa-caret-up" aria-hidden="true"></span>
</button>
<div class="cell_count gray_bg blue">
<label for="winLengthInput">Win length</label>
<input type="text" class="settings-control" id="winLengthInput" value="" readonly>
</div>
<button type="button" title="Decrease win length" class="dec button gray_bg" onclick="decreaseWinLength()">
<span class="fa fa-caret-down" aria-hidden="true"></span>
</button>
</div>
</div>
</div><!--end .flex_column_item.field_settings_group-->
<div id="player_settings">
<template id="player_instance_template">
<div class="flex_column_item player_instance">
<div class="flex_row">
<div class="flex_row_item player_name">
<input title="Player name" type="text" class="settings-control gray_bg" value=""
onchange="updatePlayer(this, 'name')">
</div>
<div class="flex_row_item settings_block">
<div class="settings_buttons">
<div class="symbol_btn">
<div class="dropdown">
<button type="button" title="Change player symbol" class="dropdown-toggle symbol_selected gray_bg">
<span class="active_symbol"></span>
</button>
<ul class="dropdown-menu player_symbol gray_bg"
onclick="updatePlayer(this, 'symbol')"></ul>
</div>
</div>
<div class="type_btn">
<div class="dropdown">
<button type="button" title="Change player type" class="dropdown-toggle type_selected gray_bg">
<span class="active_type"></span>
</button>
<ul class="dropdown-menu player_type gray_bg"
onclick="updatePlayer(this, 'type')"></ul>
</div>
</div>
<div class="remove_btn">
<button type="button" title="Delete player" class="btn remove_player blue_bg" onclick="removePlayer(this)">
<span class="fa fa-minus" aria-hidden="true"></span>
</button>
</div>
</div>
</div>
</div>
</div>
</template>
<div id="player_instances_collection"></div>
<button type="button" title="Add player" class="btn add_player blue_bg" onclick="addPlayer()">
<span class="fa fa-plus" aria-hidden="true"></span>
</button>
</div><!--end #player_settings-->
</div><!--end .flex_column-->
</div><!--end .transformer-->
</div><!--end .wrapper-->
</div><!--end .container.centered-->
</section><!--end #settings_container-->
<section class="full_width" id="game_field_container">
<div class="container centered">
<div id="play_field" class="wrapper">
<div id="play_field_body" class="transformer"></div>
</div>
</div>
</section><!--end #game_field_container-->
<footer class="full_width">
<div class="container centered">
<div class="status">
<h2 id="gameStatus" class="collapsed"></h2>
<h2 id="defaultStatus">Game status</h2>
</div>
</div>
</footer>
<script src="js/view.js" type="text/javascript"></script>
</body>
</html>