-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
32 lines (28 loc) · 883 Bytes
/
main.c
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
#include "TuringMachine.h"
int main() {
struct TuringMachine T;
create(&T);
regist(&T, 0, '0', 1, 'M', 'R');
regist(&T, 1, '0', 1, '0', 'R');
regist(&T, 1, '1', 1, '1', 'R');
regist(&T, 1, 'M', 2, 'M', 'L');
regist(&T, 1, 0, 2, 0, 'L');
regist(&T, 2, '1', 3, 'M', 'L');
regist(&T, 3, '1', 3, '1', 'L');
regist(&T, 3, '0', 4, '0', 'L');
regist(&T, 3, 'M', 5, 'M', 'R');
regist(&T, 4, '0', 4, '0', 'L');
regist(&T, 4, 'M', 0, 'M', 'R');
regist(&T, 5, 'M', 6, 'M', 'R');
//regist(&T, 0, '0', 0, '0', 'R');
//regist(&T, 0, '1', 1, '1', 'R');
//regist(&T, 0, 0, 3, 0, 'R');
//regist(&T, 1, '0', 0, '0', 'R');
//regist(&T, 1, '1', 2, '0', 'L');
//regist(&T, 1, 0, 3, 0, 'R');
//regist(&T, 2, '1', 3, '0', 'R');
execute(&T, "000111");
printf("\n");
execute(&T, "000111");
return 0;
};