-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathFIRSTELEVEX.kbs
144 lines (133 loc) · 1.94 KB
/
FIRSTELEVEX.kbs
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
G = 1
a = 140
b = 25
c = 165
d = 1
t = 262
u = 5
v = 33
w = 65
x = 232
q = 262
fastgraphics
start:
cls
clg
begin:
for k = 1 to 150
elevator:
color darkcyan
rect 43, 0, 213, 400
color gray
rect 47, 5 , 205, 290
floors:
color darkcyan
rect 85, 5, 3, 310
rect 43, 75, 213, 3
rect 43, 150, 213, 3
rect 43, 220, 213, 3
doors:
color darkgreen
rect 140, 5, 50, 70
color darkorange
rect 140, 77, 50, 73
color darkyellow
rect 140, 152, 50, 68
color darkpurple
rect 140, 222, 50, 73
color white
line 165, 5, 165, 294
chute:
color black
rect 260, 0, 37, 298
color white
rect 262, 2, 38, 294
shuttle:
color blue
rect t, u, v, w
input "Which Floor? ", h$
if h$ = "4" then goto opendoor4
if h$ = "3" then goto opendoor3
if h$ = "2" then goto opendoor2
if h$ = "1" then goto opendoor1
end
opendoor1:
for k = 1 to 26
color red
rect 47, 224, 38, 70
pause 0.05
refresh
color gray
rect 47, 224, 38, 70
pause 0.05
refresh
color white
rect c, 224, d, 71
d = d + (2*G)
c = c - G
sound (440, 50)
pause 0.05
if k = 26 then cls : print "Floor 1 Door is Open." : pause 1 : goto start
refresh
next k
end
opendoor2:
for k = 1 to 26
color red
rect 47, 152, 38, 70
pause 0.05
refresh
color gray
rect 47, 152, 38, 70
pause 0.05
refresh
color white
rect c, 152, d, 71
d = d + (2*G)
c = c - G
sound(440,50)
pause 0.05
if k = 26 then cls : print "Floor 2 Door is Open." : pause 1 : goto start
refresh
next k
end
opendoor3:
for k = 1 to 26
color red
rect 47, 78, 38, 70
pause 0.05
refresh
color gray
rect 47, 78, 38, 70
pause 0.05
refresh
color white
rect c, 78, d, 71
d = d + (2*G)
c = c - G
sound (440,50)
pause 0.05
if k = 26 then cls : print "Floor 3 Door is Open." : pause 1 : goto start
refresh
next k
end
opendoor4:
for k = 1 to 26
color red
rect 47, 5, 38, 70
pause 0.05
refresh
color gray
rect 47, 5, 38, 70
pause 0.05
refresh
color white
rect c, 5, d, 71
d = d + (2*G)
c = c - G
sound (440,50)
pause 0.05
if k = 26 then cls : print "Floor 4 Door is Open." : pause 1 : goto start
refresh
next k
end