-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtree.html
More file actions
48 lines (39 loc) · 992 Bytes
/
tree.html
File metadata and controls
48 lines (39 loc) · 992 Bytes
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
<html>
<head>
<link type="text/css" rel="stylesheet" media="all" href="style.css" />
<script src="jquery-1.4.2.min.js"></script>
<script src="processing-0.9.7.min.js"></script>
<script src="processing.init.js"></script>
<script src="jsTree.js"></script>
<script>
var node;
var DEPTH = 4;
var LEAVES = 2;
$(document).ready(function(){
node = jsTree(DEPTH, LEAVES);
$('#minimax').click(function(){
resetStatus(node, DEPTH, 0);
minimax(node, DEPTH);
});
$('#alphabeta').click(function(){
resetStatus(node, DEPTH, 2);
var alpha = -INFINITY;
var beta = INFINITY;
alphabeta(node, DEPTH, alpha, beta);
});
$('#reset').click(function(){
resetValues(node, DEPTH);
resetStatus(node, DEPTH, 0);
});
});
</script>
</head>
<body>
<div id="controls">
<a href="#" id="minimax">minimax</a>
<a href="#" id="alphabeta">alphabeta</a>
<a href="#" id="reset">reset</a>
</div>
<canvas id="canvas" datasrc="canvas.js" width="800" height="300"></canvas>
</body>
</html>