-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmove.pde
More file actions
78 lines (68 loc) · 1.84 KB
/
move.pde
File metadata and controls
78 lines (68 loc) · 1.84 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
void newHeader(char headerDirection)
{
if (headerDirection == '<') {
nx1 = nowtape*90;
nx2 = nowtape*90+90;
nx3 = (x1+x2)/2;
y12 = 120;
y3 = 80;
newtape--;
HeaderVelocityLR = -1;
} else if (headerDirection == '>') {
nx1 = nowtape*90;
nx2 = nowtape*90+90;
nx3 = (x1+x2)/2;
y12 = 120;
y3 = 80;
newtape++;
HeaderVelocityLR = 1;
}
}
void ChangeBerforeMove(){
nowtape = newtape;
nowStatus++;
ni = i;
statusFG(ni);
newHeader(headerDirection);
ntape[nowtape] = "";
ntape[nowtape]+= guchick[i].charAt(2);
if (newCriclenum == 'A') hourValue = 0;
else if (newCriclenum == 'B') hourValue = 1;
else if (newCriclenum == 'C') hourValue = 2;
println(headerDirection, newCriclenum, isequal);
println(nowStringVlaue, guchickValue);
println(i, "times");
}
void ReadyToCompare(){
guchickValue = "";
nowStringVlaue = "";
nowStringVlaue += cycle[hourValue];
nowStringVlaue += ntape[newtape];
guchickValue += guchick[i].charAt(0);
guchickValue += guchick[i].charAt(1);
headerDirection = guchick[i].charAt(3);
ndir = headerDirection;
newCriclenum = guchick[i].charAt(4);
}
void ChangeHeaderPoint(){
if (HeaderVelocityLR==1) {//right
x1+=5;
x2+=5;
x3 = (x1+x2)/2;
} else if (HeaderVelocityLR == -1) {
x1-=5;
x2-=5;
x3 = (x1+x2)/2;
}
if (HeaderVelocityLR==1&& x1>newtape*90-4) {
y12-=10;
y3-=10;
trimove = false;
delay(100);
} else if (HeaderVelocityLR == -1&&x1<(newtape)*90+4) {
y12-=10;
y3-=10;
trimove = false;
delay(100);
}
}