-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathTuring.html
executable file
·106 lines (86 loc) · 3.65 KB
/
Turing.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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="main.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
<div id="banner">
<a href="index.html">
<img src="http://i.imgur.com/awx7N8T.png" alt="malv logo" height="50">
</a>
<h1>Turing Machine</h1>
</div>
<div id="buttons">
<input type="button" value="Debug Input" onclick="debugInput()">
<input type="button" value="Check Input" onclick="checkInput()">
<input type="button" value ="Check All Previous Input" onclick="checkAllPreviousInput()">
<input type="button" value ="Clear All Previous Input" onclick="clearInputCanvas()">
<input type="button" value ="Save" onclick="saveAsCookie()">
<input type="button" value ="Load" onclick="loadFromCookie()">
<br>
Alphabet: <input type="text" name="Alphabet" value="" id="Alphabet">
<input type="button" value="Refresh Alphabet" onclick="RefreshAlphabet()">
<br></br>
<div id="RWS" style="position:absolute; left:730px; top:254px">
Read <input type="text" name="Read" value="" id="Read" readonly size="38"><br>
Write <input type="text" name="Write" value="" id="Write" size="37"><br>
Shift <input type="text" name="Shift" value="" id="Shift" size="38"> <br>
</div>
<br>
<input type="image" id="play_btn" src="Images/play_btn.png"
onmouseover="this.src='Images/play_btn.png'"
onmouseout="this.src='Images/play_btn.png'"
onclick="debugInput()"/>
<input type="image" id="state_btn" src="Images/state_btn.png"
onmouseover="this.src='Images/state_btn_hover.png'"
onmouseout="this.src='Images/state_btn.png'"
onclick="changePlacement(PlacementMode.STATE)"
style="padding-left:200px"/>
<input type="image" id="transistion_btn" src="Images/transition_btn.png"
onmouseover="this.src='Images/transition_btn_hover.png'"
onmouseout="this.src='Images/transition_btn.png'"
onclick="changePlacement(PlacementMode.TRANSITION)"/>
<input type="image" id="start_btn" src="Images/start_btn.png"
onmouseover="this.src='Images/start_btn.png'"
onmouseout="this.src='Images/start_btn.png'"
onclick="setSelectedAsStart()"/>
<input type="image" id="start_btn" src="Images/accept_btn.png"
onmouseover="this.src='Images/accept_btn.png'"
onmouseout="this.src='Images/accept_btn.png'"
onclick="setSelectedAsAccept()"/>
<input type="image" id="start_btn" src="Images/clear_btn.png"
onmouseover="this.src='Images/clear_btn.png'"
onmouseout="this.src='Images/clear_btn.png'"
onclick="deleteSelected()"/>
<br>
<input type="text" name="input" value="" id="input" size="114">
<br>
<canvas id="pointer" width="750" height ="25" style="border:1px solid #000000";></canvas>
</div>
<div id="canvases">
<canvas id="fake" width="1200" height ="1"></canvas>
<canvas id="machineSpace" width="700" height="500" style="border:1px solid #000000; float:left;"></canvas>
<canvas id="inputSpace" width="300" height="500" style="border:1px solid #000000; float:left;"></canvas>
</div>
<script>
var c=document.getElementById("machineSpace");
var ctx = c.getContext("2d");
var inputCanvas=document.getElementById("inputSpace");
var ictx = inputCanvas.getContext("2d");
var pointerCanvas=document.getElementById("pointer");
var pctx = inputCanvas.getContext("2d");
</script>
<script src="Draw.js"></script>
<script src="keyboardInput.js"></script>
<script src="Vector.js"></script>
<script src="Transition.js"></script>
<script src="State.js"></script>
<script src="Enums.js"></script>
<script src="inputCanvasBox.js"></script>
<script src="Turing.js"></script>
<script src="Update.js"></script>
<script src="Mouse.js"></script>
<script src="Files.js"></script>
</body>
</html>