-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathindex.html
161 lines (132 loc) · 4.52 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
161
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="//w3.org/1999/xhtml" dir="ltr" lang="en_US">
<head>
<title>Ulitmate Tic-Tac-Toe</title>
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="Author" content="Kenny Cason" />
<meta name="Copyright" content="Copyright (c) 2013 Ken-Soft" />
<meta name="viewport" content="width=550,
maximum-scale=1.3" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script>
<script type="text/javascript" src="Canvas.js"></script>
<script type="text/javascript" src="Util.js"></script>
<script type="text/javascript" src="Pencil.js"></script>
<script type="text/javascript" src="AI.js"></script>
<script type="text/javascript" src="TicTacToe.js"></script>
<script type="text/javascript">
var ttt;
$(document).ready(function() {
ttt = new TicTacToe(new AI());
ttt.drawBoard();
ttt.useAI = false;
});
</script>
</head>
<body>
<!-- Facebook Like Button -->
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<a href="https://github.com/kennycason/ultimate_tictactoe/" target="_blank"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"></a>
<div id="header">
<table>
<tr>
<!--<td><form><input id="toggle_ai" type="button" onClick="ttt.toggleAI();" value="Human"/></form></td> -->
<td><form><input type="button" onClick="history.go(0)" value="New"/></form></td>
<td><div class="fb-like" data-href="http://www.ken-soft.com/tictactoe/" data-send="false" data-layout="button_count" data-width="120" data-show-faces="false"></div></td>
<td><span id="turn">X</span>'s Turn </td>
<td><a href="http://mathwithbaddrawings.com/2013/06/16/ultimate-tic-tac-toe/" target="_blank">rules</a> </td>
<td><span id="msg" style="font-size:11px"></span></td>
</tr>
</table>
</div>
<div id="canvas-wrap">
<canvas id="board" width="500" height="500" style="border:1px solid #c3c3c3;">
Your browser does not support the canvas element.
</canvas>
<div id="overlay"></div>
</div>
<div id="footer">
<div style="float:left;"><a href="http://ken-soft.com/" target="_blank">by: kenny cason 2013</a></div>
<div style="float:right"><a href="http://datarank.com/" target="_blank"><img id="logo" src="datarank_logo.png"/></a></div>
</div>
<div id="data">
</div>
</body>
<style type="text/css">
#board {
background-image: url(highlight.png);
background-repeat: no-repeat;
background-position: -1000px -1000px;
}
#board {
margin-left: auto;
margin-right: auto;
display:block;
background-color:white;
}
#header {
margin-left: auto;
margin-right: auto;
width:500px;
height:30px;
margin-left: auto;
margin-right: auto;
}
#footer,#data {
margin-left: auto;
margin-right: auto;
width:500px;
margin-left: auto;
margin-right: auto;
}
a {
text-decoration:none;
color:black;
}
#logo {
height: 50px;
width: 226px;
-webkit-transform:translate3d(0,0,0);
}
@-webkit-keyframes logo {
0% {
-webkit-transform: rotate3d(1,1,1,0deg)
}
25% {
-webkit-transform: rotate3d(1,1,1,3deg)
}
75% {
-webkit-transform: rotate3d(1,1,1,-3deg)
}
100% {
-webkit-transform: rotate3d(1,1,1,0deg)
}
}
@-moz-keyframes logo {
0% {
-moz-transform: rotate(0deg)
}
25% {
-moz-transform: rotate(3deg)
}
75% {
-moz-transform: rotate(-3deg)
}
100% {
-moz-transform: rotate(0deg)
}
}
#logo:hover {
-webkit-animation: logo .2s ease-in-out alternate;
-moz-animation: logo .2s ease-in-out alternate;
-ms-animation: logo .2s ease-in-out alternate;
}
</style>
</html>