-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWRPARRY.BAS
More file actions
57 lines (43 loc) · 764 Bytes
/
Copy pathWRPARRY.BAS
File metadata and controls
57 lines (43 loc) · 764 Bytes
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
' Wrapping my brain around wrapping an array...
' R. Bassett Jr.
' 2020.11.01
DEFINT A-Z
DIM blah(1 TO 20) AS STRING
CLS
FOR X = 1 TO 20
blah(X) = "Position" + STR$(X)
NEXT X
Go:
CLS
RANDOMIZE TIMER
S = INT(RND * 19) + 1
' S = 18
PRINT "Before Selected Number:"
Z = 5
FOR X = 1 TO 5
TP = S - Z
IF TP = 0 THEN TP = 20
IF TP < 0 THEN TP = 20 - ABS(TP)
PRINT blah(TP)
Z = Z - 1
NEXT X
PRINT ""
PRINT "The Selected Number:"
PRINT blah(S)
PRINT ""
PRINT "After Selected Number:"
FOR X = 1 TO 5
TP = S + X
IF TP < 1 THEN TP = 21 - X
IF TP > 20 THEN TP = TP - 20
PRINT blah(TP)
NEXT X
PRINT ""
PRINT "Press SPACE for a new roll or ESC to exit"
I$ = ""
DO WHILE I$ <> CHR$(27)
I$ = INKEY$
IF I$ = " " THEN GOTO Go
SLEEP 1
LOOP
END