-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtuning_machine.pde
More file actions
83 lines (72 loc) · 1.58 KB
/
tuning_machine.pde
File metadata and controls
83 lines (72 loc) · 1.58 KB
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
int i, j = 2;
int hourValue = 0;
int nowtape = 0, newtape = 0;
String gumin = "A*#>B A#$>C A$*>C A0#>B B*$>A B#*>C B$$>A B0#>C C**>A C#$>B C$*>A C0#<B";
String[] guchick = split(gumin, " ");
int len = guchick.length;
String tape = "# # * 0 0 0 0 0 $ 0 0 0 0 * 0 0 0 0 0 0 0 0";
String[] ntape = split(tape, " ");
char [] cycle = {'A', 'B', 'C'};
String[] sym = {"#", "$", "*"};
String guchickValue = "";
String nowStringVlaue = "";
char newCriclenum;
char headerDirection;
boolean isequal;
boolean trimove = false;
boolean firstChanging = false;
int x1 = 0, x2 = 90, x3 = (x1+x2)/2, y12 = 120, y3 = 80;
int HeaderVelocityLR;
int nx1, nx2, nx3;
char ndir;
int ni;// for statusflag
int nowStatus = 1;
void setup()
{
size(1800, 1200);
textSize(60);
basic();
//noLoop();// this program runs only you press the mouse
}
void draw()
{
basic();
fill(#FF9F29);
triangle(x1, y12, x2, y12, x3, y3);
txting();
if (newtape>19)
{
text("END", 800, 800);
return;
}
if (trimove == false)
{
println("nwetape ",newtape);
firstChanging = true;
for (i=0; i<len; i++)
{
ReadyToCompare();
isequal = guchickValue.equals(nowStringVlaue);
if (isequal&&firstChanging)
{
firstChanging = false;
ChangeBerforeMove();
trimove = true;
}
}
noLoop();
}
else if (trimove==true)
{
loop();
ChangeHeaderPoint();
}
}
void keyPressed()
{
redraw();
}
void mousePressed()
{
redraw();
}