home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
451-475
/
apd463
/
amos1.34_progs
/
number_shuffle.amos
/
number_shuffle.amosSourceCode
Wrap
AMOS Source Code
|
1993-01-17
|
4KB
|
198 lines
Rem ===================================
Rem = =
Rem = Shuffle Number Game =
Rem = =
Rem = Written in AMOS Basic v1.21 =
Rem = =
Rem = Mandarin / Jawx =
Rem = =
Rem = By G. Albrow c.1990 =
Rem = =
Rem ===================================
'
' Escape quits
'
BEGIN:
Randomize Timer
U=0
'
Curs Off : Cls 1
Global DIFFICULTY,U,R1,R2,R3,R4,R5,R6,R7,R8,R9,J
'
Reserve Zone 8
'
Pen 0 : Paper 2 : Set Paint 1 : Ink ,,0
'
Locate 4,2
Print Border$(Zone$(" 1 ",1),2)
Locate 12,2
Print Border$(Zone$(" 2 ",2),2)
Locate 20,2
Print Border$(Zone$(" 3 ",3),2)
'
Locate 31,2
Print Border$(Zone$("About",4),2)
'
Do
If Key State(69) Then QUIT
T=Mouse Zone
If T=4 and Mouse Key>0 Then ABOUT
If U=1 Then Goto BEGIN
If Mouse Key>0 and Mouse Zone>0 Then SETUP
Loop
'
Procedure MAIN
'
Do
If Key State(69) Then QUIT
T=Mouse Zone
If T=1 and Mouse Key>0 Then SETUP
If T=2 and Mouse Key>0 Then SETUP
If T=3 and Mouse Key>0 Then SETUP
If T=5 and Mouse Key>0 Then S1
If T=6 and Mouse Key>0 Then S2
If T=7 and Mouse Key>0 Then S3
If T=8 and Mouse Key>0 Then S4
'
Locate 6,12
Print R1;" ";R2;" ";R3;" ";R4;" ";R5;" ";R6;" ";R7;" ";R8;" ";R9
'
If R1=1 and R2=2 and R3=3 and R4=4 and R5=5 and R6=6 and R7=7 and R8=8 and R9=9 Then Pop Proc
'
Loop
End Proc
'
Goto FINISH
'
Procedure SETUP
'
Locate 11,22
Print Border$(Zone$("S1",5),2)
Locate 16,22
Print Border$(Zone$("S2",6),2)
Locate 21,22
Print Border$(Zone$("S3",7),2)
Locate 26,22
Print Border$(Zone$("S4",8),2)
'
Bar 40,87 To 270,110
Pen 0 : Ink 0,,
'
Polyline 60,116 To 60,136 To 132,136 To 132,116
Polyline 83,116 To 83,126 To 108,126 To 108,116
Polyline 156,116 To 156,136 To 228,136 To 228,116
Polyline 179,116 To 179,126 To 204,126 To 204,116
Polyline 83,81 To 83,61 To 155,61 To 155,81
Polyline 106,81 To 106,71 To 131,71 To 131,81
Polyline 179,81 To 179,61 To 251,61 To 251,81
Polyline 202,81 To 202,71 To 227,71 To 227,81
'
Text 89,148,"S1"
Text 185,148,"S3"
Text 111,55,"S2"
Text 207,55,"S4"
'
Ink 2,,
Shoot
T=Mouse Zone
If T=1 Then DIFFICULTY=4
If T=2 Then DIFFICULTY=8
If T=3 Then DIFFICULTY=16
'
R1=1 : R2=2 : R3=3 : R4=4 : R5=5 : R6=6 : R7=7 : R8=8 : R9=9
'
Locate 6,12
Print R1;" ";R2;" ";R3;" ";R4;" ";R5;" ";R6;" ";R7;" ";R8;" ";R9
Wait 100
'
BACK:
'
For N=1 To DIFFICULTY
V=Rnd(3)+1
On V Proc S1,S2,S3,S4
Locate 6,12
Print R1;" ";R2;" ";R3;" ";R4;" ";R5;" ";R6;" ";R7;" ";R8;" ";R9
Wait 5
Next
'
If R1=1 and R2=2 and R3=3 and R4=4 and R5=5 and R6=6 and R7=7 and R8=8 and R9=9 Then Goto BACK
'
T=0
MAIN
'
End Proc
'
Procedure S1
'
Shoot : T=0
Swap R1,R4
Swap R2,R3
Wait 10
'
End Proc
'
Procedure S2
'
Shoot : T=0
Swap R2,R5
Swap R3,R4
Wait 10
'
End Proc
'
Procedure S3
'
Shoot : T=0
Swap R5,R8
Swap R6,R7
Wait 10
'
End Proc
'
Procedure S4
'
Shoot : T=0
Swap R6,R9
Swap R7,R8
Wait 10
'
End Proc
'
Procedure ABOUT
'
Shoot : T=0
Cls 1 : Pen 2 : Paper 1
Locate 0,4
Centre "This game idea was taken directly"
Locate 0,6
Centre "from the CASIO FX-502P program library"
Locate 0,8
Centre "Written in AMOS Basic - Mandarin / Jawx"
Locate 0,11
Centre "By G. Albrow c.1990"
Pen 3
Locate 0,20
Centre "Press any Key"
Pen 2
Wait Key
U=1 : T=1
'
End Proc
'
Goto BEGIN
'
FINISH:
'
Wait 100
Cls 1
Pen 2 : Paper 1
Locate 0,12
Centre "WELL DONE"
Wait 100
'
Goto BEGIN
'
Procedure QUIT
Default
Edit
End Proc