forked from santanche/mlca
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mlca_home.html
57 lines (55 loc) · 3.06 KB
/
mlca_home.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
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" type="text/css" href="style.css">
<title> MLCA Canvas Prototype </title>
<script type="text/javascript" src="mlca_Condition.js"></script>
<script type="text/javascript" src="mlca_Kernel.js"></script>
<script type="text/javascript" src="mlca_LayerDataStructure.js"></script>
<script type="text/javascript" src="mlca_Layer.js"></script>
<script type="text/javascript" src="mlca_Rule.js"></script>
<script type="text/javascript" src="mlca_Ruleset.js"></script>
<script type="text/javascript" src="mlca_WorstMatrix.js"></script>
<script type="text/javascript" src="mlca_automaton.js"></script>
<script type="text/javascript" src="mlca_IDisplay.js"></script>
<script type="text/javascript" src="mlca_SimpleCanvasDisplay.js"></script>
<script type="text/javascript" src="mlca_setRules.js"></script>
</head>
<body onLoad="mlca.automaton.begin()">
<canvas id="canvas" width="500" height="500"></canvas>
<div id='centerWrap'>
<button id="iterate" onClick="mlca.automaton.iterate()" onmouseup="blur()">
<font color = 'black' face = 'impact'>Iterate</font>
</button>
<button id="play" onClick="mlca.automaton.play = true;" onmouseup="blur()">
<font color = 'black' face = 'impact'>Play</font>
</button>
<button id="stop" onClick="mlca.automaton.play = false;" onmouseup="blur()">
<font color = 'black' face = 'impact'>Stop</font>
</button>
<button id="clear" onClick="(function(){
var i = 0;
for (i = 0; i<mlca.layerList.length;i++){
mlca.layerList[i].clear();
}
mlca.automaton.draw();
})();" onmouseup="blur()">
<font color = 'black' face = 'impact'>Clear grid</font>
</button>
<button id="change" onClick="mlca.automaton.display.changeLayer()" onmouseup="blur()">
<font color = 'black' face = 'impact'>Change Layer</font>
</button>
<font color = 'grey' face = 'impact'>>Layer Name: <text id="selectedlayer"></text> <text id="lockstatus"></text></font>
<br>
<font color = 'grey' face = 'impact'>>Coordinate: [<text id="mousex"></text>,<text id="mousey"></text>]</font>
<form action="">
<br>
<font color = 'yellow' face = 'impact'>Chance to change direction: <text id="PMD"></text></font><br>
<input type="text" name="PMD"><br>
<font color = 'yellow' face = 'impact'>Chance to leave the pheromone trail: <text id="PSF"></text></font><br>
<input type="text" name="PSF"><br><br>
<input type="button" value="Update" onclick="mlca.automaton.changeProbs(this.form)">
</form>
</div>
</body>
</html>