-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathLUDOX1.kbs
229 lines (208 loc) · 4.08 KB
/
LUDOX1.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
begin:
dim wgf$(35)
dim which(6)
dim randoms(20)
wgf$ = {"Red", "Yellow", "Green", "Blue","Red", "Yellow", "Green", "Blue","Red", "Yellow", "Green", "Blue","Red", "Yellow", "Green", "Blue","Red", "Yellow", "Green", "Blue"}
which = {1,2,3,4,5,6}
A = INT(RAND * 3) + 1
B = INT(RAND * 5) + 1
C = INT(RAND * 5) + 1
D = INT(RAND * 5) + 1
E = INT(RAND * 5) + 1
F = INT(RAND * 5) + 1
G = INT(RAND * 5) + 1
H = INT(RAND * 5) + 1
I = INT(RAND * 5) + 1
J = INT(RAND * 5) + 1
K = INT(RAND * 5) + 1
L = INT(RAND * 5) + 1
M = INT(RAND * 5) + 1
N = INT(RAND * 5) + 1
O = INT(RAND * 5) + 1
randoms = {B, C, D, E, F, G, H, I, J, K, L, M, N, O}
clg
a = 60
b = 200
c = 50
d = 190
FOR K = 1 TO 1
cx1 = 80
cy1 = 230
cx2 = 220
cy2 = 230
cx3 = 220
cy3 = 90
cx4 = 80
cy4 = 90
r = 2
print " LUDO"
print " "
print "Choose the color you wish to be: Red, Yellow, Green, or Blue."
background:
color darkgreen
rect 130, 180, 40, 100
color darkred
rect 130, 40, 40, 100
color darkblue
rect 170, 140, 100, 40
color darkyellow
rect 30, 140, 100, 40
color white
line 143, 140, 143, 40
line 157, 140, 157, 40
line 143, 280, 143, 180
line 157, 280, 157, 180
rem ----------------
line 170, 153, 270, 153
line 170, 167, 270, 167
line 30, 153, 130, 153
line 30, 167, 130, 167
rem ----------------
line 130, 140, 170, 180
line 170, 140, 130, 180
for k = 1 to 4
line 130, a, 170, a
line 130, b, 170, b
a = a + 20
b = b + 20
next k
for t = 1 to 4
line c, 140, c, 180
line d, 140, d, 180
c = c + 20
d = d + 20
next t
color green
circle cx1, cy1, r
color cyan
circle cx2, cy2, r
color red
circle cx3, cy3, r
color yellow
circle cx4, cy4, r
rem seq 4 is yellow
rem seq 3 is red
rem seq 2 is cyan
rem seq 1 is green
color white
line 110, 140, 130, 120
line 190, 140, 170, 120
line 110, 180, 130, 200
line 190, 180, 170, 200
initialpos:
rem green 136, 270, 2
rem red 164, 50, 2
rem yellow 40, 146, 2
rem blue 260, 174, 2
z = key
Print "Who is Red? (Press Spacebar to Respond)"
pause 2
if z = 32 then goto next1
next1:
Print "Who is Yellow? (Press Spacebar to Respond)"
pause 2
if z = 32 then goto next2
next2:
Print "Who is Green? (Press Spacebar to Respond)"
pause 2
if z = 32 then goto next3
next3:
Print "Who is Blue? (Press Spacebar to Respond)"
pause 2
if z = 32 then cls : print " LUDO"
cls
print " LUDO"
PER1:
for runt = 0 to 15
PAUSE 2
cls
print " LUDO"
print wgf$[runt];
print "'s Turn"
input "Press any key to roll dye. ", nt$
print "You got a ";
print which[randoms[runt]]
if which[randoms[runt]] = 1 then GOSUB dye1
if which[randoms[runt]] = 2 then GOSUB dye2
if which[randoms[runt]] = 3 then GOSUB dye3
if which[randoms[runt]] = 4 then GOSUB dye4
if which[randoms[runt]] = 5 then GOSUB dye5
if which[randoms[runt]] = 6 then GOSUB dye6
if which[randoms[runt]] <> 6 then print "Sorry you didn't get a 6 : Next person's turn"
if which[randoms[runt]] = 6 then goto UNDER
PER:
next runt
end
UNDER:
For J = runt to 50
pause 2
cls
print " LUDO"
print wgf$[J];
print "'s Turn"
input "You must roll again. Press any key to roll dye. ", nt$
print which[randoms[J]]
if which[randoms[J]] = 1 then GOSUB dye1
if which[randoms[J]] = 2 then GOSUB dye2
if which[randoms[J]] = 3 then GOSUB dye3
if which[randoms[J]] = 4 then GOSUB dye4
if which[randoms[J]] = 5 then GOSUB dye5
if which[randoms[J]] = 6 then GOSUB dye6
NEXT J
dye1:
color white
rect 20,30,40,40
color black
circle 39,48,7
RETURN
end
dye2:
color white
rect 20,30,40,40
color black
circle 32,48,6
circle 46,48,6
RETURN
end
dye3:
color white
rect 20,30,40,40
color black
circle 26,36,5
circle 36,48,5
circle 46,60,5
RETURN
end
dye4:
color white
rect 20,30,40,40
color black
circle 26,36,5
circle 51,36,5
circle 26,58,5
circle 51,58,5
RETURN
end
dye5:
color white
rect 20,30,40,40
color black
circle 26,36,5
circle 51,36,5
circle 26,58,5
circle 51,58,5
circle 39,48,5
RETURN
end
dye6:
color white
rect 20,30,40,40
color black
circle 26,36,5
circle 38,36,5
circle 51,36,5
circle 26,58,5
circle 38,58,5
circle 51,58,5
RETURN
end